c++ - function with no return type -
i have 2 quick questions, i'm hoping can clarify me.
- when writing function input paramater list same parameters?
- when function has no return type "return 0;" left out of function code?
for example if write function used integers in input parameter list no return type proper way write it?:
int converttemp( int a, int b) {}
int converttemp( int a, int b) {} should be:
void converttemp( int a, int b) {} if function not return anything, int means function's return type int. note can still have return statements in function return type void.
Comments
Post a Comment