There are 2 ways to define a member function: 1.Inside class definition 2.Outside class definition To define a member function outside the class definition we have to use the scope resolution :: operator along with class name and function name.
Note: All the member functions defined inside the class definition are by default inline.