This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Now that you have some idea of a very simple C++ program structure, here is a more general program structure: 1) Comments-- It is conventional to including a few details about your program at the top of the file, both for documentation and so that other programmers can better understand your program. You will likely want to write the name of the file or program, the version, the date, your name, your company or school, and a quick synopsis of the program's functionality. 2) Header files-- As mentioned above, #include other files containing function definitions that you will need. 3) Class definitions-- Classes let you create objects. They are essentially new data types that may contain functions for retrieving, setting or manipulating the objects to which they belong. This will set up much of the functionality for the rest of your program. 4) Member function definitions-- Classes usually contain functions, most of which will be defined outside of the actual class definition. Member functions are defined outside of the class definition brackets not only to keep your program class definition....
View Full Document
This note was uploaded on 12/12/2011 for the course CIS 101 taught by Professor Keefe during the Spring '08 term at Texas State.
- Spring '08