• Kurse
  • Code Compiler
  • Diskutieren
  • Preise
  • 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 Antwort
+ 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

Häufig solche Fragen?

Effizienter lernen, kostenlos:

  • Einführung in Python

    7.1M Lernende

  • Einführung in Java

    4.7M Lernende

  • Einführung in C

    1.5M Lernende

  • Einführung in HTML

    7.5M Lernende

Alle Kurse anzeigen
Heute heiß
Hello can anyone help me to learn gdscript
0 Votes
What coding language should i use to make a custom coding language?
0 Votes
hello world i need help
2 Votes
Anyone Learning Godot?
1 Votes
Any easy game ideas for beginners?
0 Votes
Which is more important CSS vs HTML vs JS?
1 Votes
How many courses are there on Sololearn
1 Votes
hi
1 Votes
Which databases are the best at injecting dynamic data within websites, and how can you achieve it?
0 Votes
How to increase My Level is SoloLearn ?
0 Votes