What is the difference .....

between

string let = "";

and

string let;

or both are wrong?
The first one initializes let with an empty string, leaving let empty.

The second one uses the default constructor of std::string, which initializes the object as an empty string.

In other words, both statements do the same, but the second one is marginally faster.
Thank you Sir. :)
Topic archived. No new replies allowed.