Defining Member Functions

Member functions can be defined in two places:

1. Outside the class definition.
2. Inside the class definition.

It is obvious that, irrespective of the place of definition, the function should perform the same task. Therefore, the code for the function body would be identical in both the cases. However, there is a subtle difference in the way the function header is defined.

No comments:

Post a Comment