What is the structure of a C++ program?
What is the structure of a C++ program?
Last edited by CrazYjoe; 10-04-2006 at 09:07 PM.
A suitably vague answer for a vague question, I'd say.Code:// Preprocessor Directives ( Optional ) // Class Definitions and Function Prototypes or Definitions ( Optional ) // Main Function // Function and Method Definitions if they aren't above the Main Function ( Optional )
Sent from my iPadŽ
And just a guideline too, ignoring that you can freely intermix those as long as the already-seen rule is observed, and also ignoring the possiblity of multiple files.
Nah, the question doesn't have an answer, not even a vague one.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
Read a book or better still write the hello world program. That gives you a C++ program in it's most basic form