Group5
Group5
Outside A Class
The member function is defined outside the class
definition it can be defined using the
scope resolution operator(::).
Syntax:
Class Class_name {
public:
return_type method_name(); // method
outside class definition
}; // Outside the class using scope resolution
operator
Return_type Class_name :: method_name() {
//body of member function
}
Creating Object
Class_Name Object_Name;
Example:
Demo_Class Obj;
Memory Allocations For
Objects