Why does class support the initialization of the static variable inside the
class with const keyword and without const keyword why does not allow to
initialize the static variable inside the class
class test
{
public:
int x;
static int y = 2; // It will throw an error
static const int z = 3; // It will not throw an error, why?
};
int main()
{
return 0;
}