return_type function_name(opt_parameter_list){
doSomething();
}
void is no return typereturn statement
2.cppAbsolutely useless, but I guess
int myParamDoesNothing(int){
return 1;
}
myParamDoesNothing(); // Fails
myParamDoesNothing(123456); //1
int foo(int a, int b = 2, int c = 3){
return a+b+c;
}
foo(1);//6
foo(1,1);//5
foo(1,1,1)//3
//Cannot do foo(a=4, c=1)