如何用VC.net环境编译C++程序?
如何用VC.net环境编译C++程序?
我把msdn中一段standard c++程序如下:
#include <string>
#include <iostream>
void main()
{
string s1;
cout << "Enter a sentence (use <space> as the delimiter): ";
getline(cin,s1, ' ');
cout << "You entered: " << s1 << endl;;
}
在VC环境中编译,报错:
c:\wuq\cpp\mycdll\mycdll.cpp(9): error C2065: “string” : 未声明的标识符
请问既然包含了头文件string,(编译时候也没要报找不到该文件,该文件确实存在)
为何还找不到该类型?