code below
class A
{
int a;
public:
int func(int x); //why the definition is given outside the class
}
int A::func(int x)
{
a=10;
cout << a <<endl;
}
but i studied that if we define inside class its default becomes an inline function. but another thing is inline is a request to compiler.if function has more number of statements its treated as normal fucntion itself.so why are we defining outside the class.