• Cursos
  • Compilador de Código
  • Discutir
  • Preços
  • Teams
Menu
0

When should you declare a class?

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

classescppquestionhelphelp-meplease-helpdeclare-a-class
4th May 2018, 10:35 AM
Jackson Meddows
Jackson Meddows - avatar
1 Resposta
+ 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

Costuma ter perguntas como essa?

Aprenda de maneira mais eficiente, de graça:

  • Introdução ao Python

    7.1M de alunos

  • Introdução ao Java

    4.7M de alunos

  • Introdução ao C

    1.5M alunos

  • Introdução ao HTML

    7.5M alunos

Ver todos os cursos
Quente hoje
My codebits section is full of deleted codes
13 Votes
Ai generated practices
1 Votes
Where did mess up....
1 Votes
I have an error in a problem and I don't know what the correct answer is
1 Votes
Feedback on my portfolio
0 Votes
Yo this is madness
0 Votes
How can i insert files?
1 Votes
help!!! How to build portfolio? I am in last year of highschool and still noob lol
0 Votes
Hi who can hel me please
0 Votes
Where can I find python and SQL projects to work on for my portfolio that are beginner to intermediate?
1 Votes