标签: c++ string
我一直认为,如果我想使用C ++字符串,则必须包含标题<string>。但是,下面的代码编译并正确运行,不包括标题#include <iostream> int main() { std::string a = "Hello world"; a += ", this is string."; std::cout<<a<<std::endl; return 0; } 。这怎么可能?
<string>
#include <iostream> int main() { std::string a = "Hello world"; a += ", this is string."; std::cout<<a<<std::endl; return 0; }
viewFor annotation: MKAnnotation