C++ Programming Tutorial II

Classes and Objects


Classes


class class-name {
     private data and functions 
access-specifier:
     data and functions
access-specifier:
     data and functions
...
...
...
access-specifier:
     data and functions
} object-list;
class employee {
   char         name[80];
   double       wage;

public:
   void putname (char *n);
   void getname (char *n);
   void putwage (double w);
   double getwage();
};



[ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 ]
 
Disclaimer: This is a user-contributed webpage hosted in Department of Computer Science and Engineering, The Chinese University of Hong Kong.
The department is not responsible for the contents nor any loss or damage due to it.