Function question
Is void a return type or what type of function is it?
Can someone explain the differences between int and void functions?
Thanks
void is a return type - meaning no value is returned from the function.
Functions can return any kind of built in type plus any user type such as a class object.
HTH
The type of the function is the type of data it returns. Declaring it as
int function_name()
is like having
int return(1)
for a return statement (but don't do that).
Topic archived. No new replies allowed.