class School
{
static const int *classcapacity;
};
This expression is from my exam and it need to get initialized how can i do that ?
You can initialize it in your source file, outside of the body of the class, just as you would any other static member variable, i.e.:
const int* School::classCapacity(new int(42));
Probably this way:
class School{
static const int *classcapacity ;
};
const int *School::classcapacity = 0;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With