Null-terminate a string is something you won't have to deal with with std::stringstd::string. Firstly, every function that accepts std::stringstd::string already knows the length and does not require NULLNULL termination. Secondly, std::stringstd::string has a c_str()c_str() wrapper that provides a NULLNULL-terminated string for you, so you don't have to screw around with it. Just set the string to the length you want with resize and it's done.
Null-terminate a string is something you won't have to deal with with std::string. Firstly, every function that accepts std::string already knows the length and does not require NULL termination. Secondly, std::string has a c_str() wrapper that provides a NULL-terminated string for you, so you don't have to screw around with it. Just set the string to the length you want with resize and it's done.
Null-terminate a string is something you won't have to deal with with std::string. Firstly, every function that accepts std::string already knows the length and does not require NULL termination. Secondly, std::string has a c_str() wrapper that provides a NULL-terminated string for you, so you don't have to screw around with it. Just set the string to the length you want with resize and it's done.
Null-terminate a string is something you won't have to deal with with std::string. Firstly, every function that accepts std::string already knows the length and does not require NULL termination. Secondly, std::string has a c_str() wrapper that provides a NULL-terminated string for you, so you don't have to screw around with it. Just set the string to the length you want with resize and it's done.