北京好吃的日本寿司店:c++中<string.h>后有没有那个.h。???????/

来源:百度文库 编辑:高考问答 时间:2024/05/01 11:28:30

也可以这么写,我在vc++6.00试验一下,是可以的
当然也可以不加h后缀,但要再加一句using namespace std;
完整的写法是:
#include<iostream>
#include<stirng>
using namespace std;

C++标准中废除了#include <string.h>的写法
正确是#include <string>

楼上的很对,建议设为最佳答案

如果不用.h ,则要加using namespace std;

我也是这样认为的啊