+ 1

Fir what do u use "string" headerfile?

29th Jul 2017, 4:01 AM
Swaroop M
Swaroop M - avatar
2 Antworten
+ 7
<string> includes the string class, which is used for manipulation of string objects. http://en.cppreference.com/w/cpp/header/string Some compilers automatically add the <string> header for you, when you use a string variable. However, it is better to explicitly include the header if you will be using strings. VS2017, for example does not overload << for string variables in the output stream if <string> is not included.
29th Jul 2017, 4:13 AM
Hatsy Rei
Hatsy Rei - avatar
+ 5
strings.. i.e string someText { "This is a string" };
29th Jul 2017, 4:06 AM
jay
jay - avatar