P
Pallav singh
Hi All
why i am getting error for static variable under private section
class Test
{
private :
static int s_private_int;
public:
static int s_public_int;
};
int main()
{
Test::s_public_int = 145; // OK
Test::s_private_int = 12; // wrong, don't touch
// the private parts
return 0;
}
Thanks
why i am getting error for static variable under private section
class Test
{
private :
static int s_private_int;
public:
static int s_public_int;
};
int main()
{
Test::s_public_int = 145; // OK
Test::s_private_int = 12; // wrong, don't touch
// the private parts
return 0;
}
Thanks