0

When should you declare a class?

Do you declare a class before int main() or inside int main()?

4th May 2018, 10:35 AM
Jackson Meddows
Jackson Meddows - avatar
1 Odpowiedź
+ 10
Before or after, not inside If you declare it after you must forward declare it. See forward declaration: http://www.learncpp.com/cpp-tutorial/17-forward-declarations/
4th May 2018, 10:43 AM
jay
jay - avatar