error: `cout' was not declared in this scope
原因:
C++ 1998 要求cout and endl被调用使用'std::cout'和'std::endl'格式,或using namespace std;
修改后:
#include<iostream>
std::cout << "Hello World!" << std::endl;
或者
#include<iostream>
using namespace std;
error: `cout' was not declared in this scope的更多相关文章
- error: 'LOGE' was not declared in this scope
移植了下HAL,发现编译出现如下错误 error: 'LOGE' was not declared in this scope 比较了一下android4.1的 system/core/include ...
- c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow
c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow fcgio.cpp:50: error ...
- 【QT】error: 'SIGNAL' was not declared in this scope
error: 'SIGNAL' was not declared in this scope 未在此范围内声明. connect(ui->Btnshowhello,SIGNAL(clicked ...
- [Error] 'exit' was not declared in this scope的解决方法
新手刚开始用Linux和c++写程序,可能会出现下面的错误 error: ‘exit’ was not declared in this scope 解决方法是 添加 #include <cst ...
- 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题
环境工具:Win10.VS2013.cocos2d-x-2.2.6.Cygwin.ADT 问题来源:写了一个小游戏,VS2013上运行成功,就尝试着打包apk,项目导入到ADT里面,添加了cocos2 ...
- 编译是报error: 'EVNET_COME_TO_FOREGROUND' was not declared in this scope
Compile++ thumb : game_shared <= main.cpp jni/hellocpp/main.cpp: In function 'void Java_org_coco ...
- 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope
解决办法 出现错误:jni/ffmpeg/libavutil/common.h:175:47: error: 'UINT64_C' was not declared in this scope 解决: ...
- In function 'int av_clipl_int32_c(int64_t)': error: 'UINT64_C' was not declared in this scope
cygwin下使用ndk编译jni时遇到的错误: /ffmpeg/include/libavutil/common.h: In function 'int av_clipl_int32_c(int64 ...
- error: ‘errno’ was not declared in this scope
问题: 将一个c文件改为cpp文件,其中的perror()改用C++中的std::cerr << strerror(error) << std::endl;来替换. 重新编译文 ...
随机推荐
- 使用VSCode调试Jest
0. 环境 Node版本:8.12.0 操作系统:windows10 1. 配置launch.json { "version": "0.2.0", " ...
- VC++调试错误的解决方案
这篇文章主要用来记录使用Visual Studio过程中,出现的各种error,并提供自己当时解决的方案.但是,一个error可能由不用原因引起的,文中案例仅供大家参考. nafxcwd.lib(th ...
- 练习markdown语法
这是一级标题 这是二级标题 这是三级标题 -列表试验 -据说这样无编号 编号文档 编号文档 编号文档 插入链接测试 插入图片测试 引用测试> 一蓑烟雨任平生 粗体测试我是加粗的 斜体测试我是斜体 ...
- Spark Standalone cluster try
Spark Standalone cluster node*-- stop firewalldsystemctl stop firewalldsystemctl disable firewalld-- ...
- git删除远程分支,删除本地分支
远程 # git push origin --delete duck - [deleted] duck 本地 # git branch -d duck 已删除分支 duck(曾为 dda11b8). ...
- 树中的路径和 Sum of Distances in Tree
2019-03-28 15:25:43 问题描述: 问题求解: 写过的最好的Hard题之一. 初看本题,很经典的路径和嘛,dfs一遍肯定可以得到某个节点到其他所有节点的距离和.这种算法的时间复杂度是O ...
- iOS坐标转换失败?
使用UIKit的坐标转换方法convertxxx,千万要注意: 一个控件可以转换子控件上的某个点,到另外一个控件上 但是不能转换自己本身的点,到另外一个控件上,否则会数量加倍 所以,一个控件若想转换本 ...
- 【原】git常见用法
1.克隆 当前用户:git clone 192.165.53.15:/home/git/repo/Tegra/bsp/tx1_filesystem.git/ 非当前用户:git clone xxxxx ...
- 使用PsPing测试Azure虚拟机的连通性
Azure虚拟机启动后,如果在个人的PC上ping该虚拟机的public IP,会出现Request time out的信息,无法ping通.这是因为在 Azure 中,ICMP 包无法通过防火墙和负 ...
- postgresql 空间函数 随笔
1. ST_Buffer(geometry, double, [integer])buffer操作一个很有用函数,这个函数的第一个参数是要操作的空间几何数据,第二个参数长度(距离),第三个参数为一个整 ...