c++ - function with no return type -


i have 2 quick questions, i'm hoping can clarify me.

  1. when writing function input paramater list same parameters?
  2. 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

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -