I have a piece of code where I create an object with the default constructor, but the constructor (and destructor) isn't called. I use ConstructorTest a();
to create the object, which should just call the default constructor. If I remove the (), it does work.
how come the constructor isn't called when using ()?
when a constructor doesn't have a parameter then u just call it using a variable name
BUT if they do then i think u need to call it your way using the brackets with the parameter values