Classes are used for two main reasons: (1) it makes it much easier to organize your programs if you can group together data with the functions that manipulate that data, and (2) the use of private members makes it possible to do information hiding, so that you can be more confident about the way information flows in your programs (if you want to impress people, you call this enforcing invariants).
Source : http://faculty.cs.tamu.edu/bettati/Courses/410/2006B/Projects/
| Download | Size |
|---|---|
| intro_c++.pdf | 110.61 KB |