+ 1

too difficult ,..... print it works

void_________() int main.() { some _fun (){ return 0; } _____some _fun (){ cout<< "it works"<<endl; }

11th Mar 2017, 4:13 PM
Akshay
2 Answers
+ 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.
11th Mar 2017, 4:16 PM
Hatsy Rei
Hatsy Rei - avatar
+ 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...
13th Mar 2017, 7:40 AM
Frederick Eccher
Frederick Eccher - avatar