我正在尝试输入简单的“Hello World!” 代码,但 cout 和 endl 未定义。
#include<iostream>
#include "stdafx.h"
int main()
{
std::cout << "Hello World!" << std::endl;
}
结果是错误:“'cout': is not a member of 'std', note: see declaration of 'std', 'cout': undeclared identifier”,和 endl 一样。请帮忙。