use*_*416 1 c++ visual-c++-2010 visual-studio-2012
我正在尝试学习c ++,但是像"cout"和"cin"这样的简单方法不存在这是我的代码:
#include "stdafx.h"
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
cout>>"hello";
return 0;
}
Run Code Online (Sandbox Code Playgroud)
有一个错误,上面写着"错误C2065:'cout':未声明的标识符"
和"智能感知:标识符"cout"未定义"
cout在std命名空间中声明:
int _tmain(int argc, _TCHAR* argv[])
{
std::cout << "hello";
return 0;
}
Run Code Online (Sandbox Code Playgroud)
你也做错了.请注意我是如何将尖括号放在上面的.
| 归档时间: |
|
| 查看次数: |
5525 次 |
| 最近记录: |