To be more explicit, I get a compile time error when I try accessing an instance variable when I create an object using (), but when I don\'t, the code compiles and runs as expe
The problem is that Student jack(); declares a function with Student as a return type. It doesn't declare an object of that class as you expect.
Student jack();
Student