Want to understand why there is no compilation error
If a class has a static object of same type and the class has parametric constructor why it didnt enfore while creating it
class test {
static test a;
int b;
public:
test(int arg) {
b = arg;
}
};
int main() {
test t1(100);
return 0;
}
I know that to make it work I need to add as
test test::a(100)
but without the above line why there is no compilation error . Any pointer