真的必须导入string吗?
我在devc++中开发时,并没有导入string库,只导入了iostream库,但是依然可以使用string 来声明使用一个变量,这个是为什么呐?
代码例如
#include<iostream>
using namespace std;
int main()
{
string s = "Hello World";
cout << s << endl;
return 0;
}我在devc++中开发时,并没有导入string库,只导入了iostream库,但是依然可以使用string 来声明使用一个变量,这个是为什么呐?
代码例如
#include<iostream>
using namespace std;
int main()
{
string s = "Hello World";
cout << s << endl;
return 0;
}2020-02-25
举报