I've just read a tutorial on Classes Under the hood/behind the scenes.
It says that:
Foo* A = new Foo(); // Is different from: Foo* B = new Foo;
What in the world? I never put the brackets for my classes like that. Why does the first initialize variables and the second not do the same?
Does this only happen if I use the new operator? Example:
Foo A(); Foo B;
Does it happen for these too? Or is it just the new operator alone?
This tutorial completely threw me off and caught me off guard as now I'm thinking that none of my classes were initialized even though in my constructor I do:
Foo() : VarX(0), VarY(0) Foo(int X, int Y) : VarX(X), VarY(Y)
Please clear up these details for me.
Edited by triumphost