Private Member Functions:
A private member functions can be called by the members of the same class. Consider the following example.
class sample
{ int number;
float cost;
void read(void);
public:
void update(void);
void display(void);
};
sample p; Constructing a object of class sample.
p.read( ); This is a invalid statement the private member cannot be accessed outside the class. However this is a valid statement because the read is in the same class sample.
void sample : : update(void)
{read ( );
}