Now I have seen functions beeing declared this way:
int functionname(argument name+type)
{
code
}
but I have also seen
void functionname(argument name+type)
{
code
}
and this also works
functionname(argument name+type)
{
code
}
I'm confused :blink: what does this optional int,void have to say?
dunno bout the void but the int says that that function returns an interger i think thats why most programs haver return 0; at the end of int main but i could be wrong.
Yeah, void, int, double, char, etc. before a function declares its return type.
Void means it doesn't return a value. It's a good idea to put something there, even if it is void.