According to Herbert schildt C++ complete reference "A non-static member variable cannot have an initializer."
however when i run following code,it runs..
class ABC
{
public:
int a=3;
ABC();
};
ABC::ABC()
{cout<<a;
}
int main()
{
ABC obj;
}
regards,