+ 1
too difficult ,..... print it works
void_________() int main.() { some _fun (){ return 0; } _____some _fun (){ cout<< "it works"<<endl; }
2 odpowiedzi
+ 11
Before your main function, you have your function prototype/declaration, which is the function header without the body. Below main function, that is your function header and body. Both answers can be found directly in the question.
+ 3
if you write your whole function above main, you reduce the chance of getting a typo by writing your function header above main. I also need to have the whole function above main in case I want to add identical functions with different data types...