I\'m relatively new to C++ and I\'m still getting to grips with the C++ Standard Library. To help transition from C, I want to format a std::string using printf
1) You do not need to make space for the null terminator.
2) capacity() tells you how much space the string has reserved internally. length() tells you the length of the string. You probably don't want capacity()