8 Apr
2006
8 Apr
'06
3:56 p.m.
On 4/8/06, Lynn Allan
Sorry if this is off-topic.
Just wanted to check .... are std::string's defined to be null terminated?
I came across a web page that indicated they are, but you can find lots of misinformation on the web. http://www.codeproject.com/string/cppstringguide2.asp
std::string's seem to be null terminated with the Microsoft vc7.1 and vc8 compiler, but I wanted to check if this is generally true according to the C++ standard.
I'm relatively new to stl and using std::string .... mostly have used C strings and MFC CStrings (which changed from vc6 to vc7.1?)
std::string::c_str() returns a pointer to a null-terminated string, yes.