I have questions about C++ initialization.
In Java: if I want a empty StringBuffer, I should use
StringBuffer sb = new StringBuffer();
to initialize a empty string buffer.
In C++: If I want to use a empty string, I can just declare
std::string str;
or std::string str = "";
In real world projects should I always write like the second form?
How about declare an empty vectors?
vector<int> vec;
Is this OK? or should I give some null values to this vec?