Classes

Classes

Defining classes
class Employee {
public:
int set_number(char []);
float calc_pay(float, float); //member function
char SSN[9];
char name[60];

private:
int emp_no;
float pay_rate;

};
In-class Definition of Student

Member Functions

Scope of Classes and Accessing members

r.SetNumerator();

 

Separating Interface from Implementation

#define rational.h

class def

#endif

 

Controlling Access to Members

Member Functions and Data Members

Returning reference to private data member

Default Member Copy - Assignment