I think that it has a lot of information about it but I don\'t know how this is called. I cannot understand difference between next two strings of code:
Obje
Object obj();
Declares a function names obj
that returns a Object
and takes no parameters. This is generally not what you want.
Object obj = Object();
Declares an Object
named obj
then is copy initialized with a temporary default constructed Object
. You normally don't want to do this either unless you are resetting an object back to a default state.
Generally if you want to construct without calling a constructor you can use
Object obj;
//or
Object obj{};