I\'m watching some video tutorials on C++ and i know you must define a function / class before it is used or called. But I like having my main() function at the top, and eve
One scenario where the class definition after the main() function makes sense:
#include using namespace std; void f(); int main() { f(); return 0; } class ClassOne { public: void coolSaying() { cout << "Cool stuff yo!" << endl; } }; void f() { ClassOne one; one.coolSaying(); }