previous | start | next

Employee Example Class

    1   class Employee
    2   {
    3     string name;
    4     char ssn[12];
    5     double salary;
    6   public:
    7     Employee();
    8     Employee(const char nm[], const char ss[], double sal);
    9     string getName() const;
   10     const char * getSSN() const;
   11     double getSalary() const;
   12     void setSalary(double sal);
   13   
   14   };

What's going on with all the const qualifiers?



previous | start | next