Calling constructors in c++ without new
- by Nils
I've often seen that people create objects in C++ using
Thing myThing("asdf");
Instead of
Thing myThing = myThing("asdf");
This seems to work (using gcc), at least as long as there are no templates involved. My question now, is the first line correct and if so should I use it?