case1:
包含文件次序错了。改为`
#include "stdafx.h"
#include "iostream"
.....
case2:
没有添加命名空间std所在的头文件iostream
正确写法:
#include "stdafx.h"
#include <iostream>
int main()
{
std::cout << "hello world!I'm C++." << std::endl;
system("pause");
return 0;
}
或
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
cout << "hello world!I'm C++." << endl;
system("pause");
return 0;
}