Where exactly should the prototypes be declared? For example right after the include statments, or right before the main method? I know they both compile but is one considered more standard or more redable?
#include <iostream>
#include <cstdlib>
const unsigned int PI = 3.14;
using namespace std;
int myFunc(int x, int y);
long factorial(int n);
int main()
{
//...
return 0;
}
or
#include <iostream>
#include <cstdlib>
int myFunc(int x, int y);
long factorial(int n);
using namespace std;
int main()
{
//...
return 0;
}
or shoudl they not be used at all and main should be declared last?
No one has really addressed if one way is more readable or prefered.