vs2015 debug时出现 C2039“cout”: 不是“std”的成员
今天想起电脑上的vs2015,发现好久没用了,用了下,遇到了一个问题
由于不常用c++,还是觉得应该记录下来,以免下次遇到,不知怎么处理
新建项目Hello
Hello.cpp
#include "stdafx.h" int main()
{
std::cout << "hello world!I'm C++." << std::endl;
system("pause");
return ;
}
debug时出现
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C2039 “cout”: 不是“std”的成员 Hello e:\c\hello\hello\hello.cpp 8
解决的方法:
包含命名空间std所在的头文件iostream
#include <iostream>
下面的可以正常运行
#include "stdafx.h"
#include <iostream>
int main()
{
std::cout << "hello world!I'm C++." << std::endl;
system("pause");
return ;
}
或
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
cout << "hello world!I'm C++." << endl;
system("pause");
return ;
}
vs2015 debug时出现 C2039“cout”: 不是“std”的成员的更多相关文章
- error C2039: “bind2nd”: 不是“std”的成员
VS2012 出现如下错误: error C2039: "bind2nd": 不是"std"的成员 头文件中加上 #include <functi ...
- 如何修改Eclipse在Debug时背景色
比较喜欢暗色的Eclipse主题,安装了Eclipse color theme,使用了Oblivion这个黑色背景的主题. 更换了暗色的Eclipse主题后,Debug时看不清文字: 需要更背景颜色, ...
- (转)log4j日志级别设置成DEBUG时输出Html代码等问题:
log4j日志级别设置成DEBUG时输出Html代码等问题: 问题: log4j日志级别设置成DEBUG时会输出很多信息,包括一些Html代码 解决方案: log4j的控制是树形,所以在log4j.p ...
- IntelliJ IDEA 调试(debug)时非常慢的原因
IntelliJ IDEA 开发时,发现有时Debug时tomcat启动的非常慢,需要等待超过20分钟,但有时就很快,经查找发现是断点设置问题, 若断点设置在方法名上,debug时就会非常慢, 如图 ...
- Debug时含有的子元素,在代码里获取不到的问题
比如,Debug时如下图展示: 我想要获取的是:ansList.get(i).getComponent().getConnectorId() debug时明明有这个元素,但是当我写出来的时候却发现:a ...
- Eclipse调试DEBUG时快速查看某个变量的值的快捷键、快速跳转到某行的快捷键
Eclipse调试DEBUG时快速查看某个变量的值的快捷键 Ctrl + Shift + i
- vs2015 编译时项目出现NuGet程序包还原失败,找不到xxx.xxx.xxx版本的程序包,怎么解决这个问题?
vs2015 编译时出现这个NuGet程序包还原失败问题,项目还是运行得了,就是每次看到错误列表中有很多个错误,就感觉不舒服. 总算被我找到解决方法了 问题截图:
- Spring Boot 在IDEA中debug时的hot deployment(热部署)
因为Spring Boot的项目一般会打包成jar发布, 在开发阶段debug时, 不能像传统的web项目那样, 选择exploded resources进行debug, 也没有热更新按钮, 如果每次 ...
- ctrl+shift+i eclipse快捷键,debug时显示全黑屏
ctrl+shift+i eclipse快捷键,debug时显示全黑屏,这样方便进行查看内容.
随机推荐
- 用数据泵技术实现逻辑备份Oracle 11g R2 数据泵技术详解(expdp impdp)
用数据泵技术实现逻辑备份 from:https://blog.csdn.net/weixin_41078837/article/details/80618916 逻辑备份概述 逻辑备份时创建数据库对象 ...
- appium环境应该注意问题
python中的script要加入到环境变量中 pip3 install appium-python-client(安装appium模块通过引入webdriver) 如果pip3不是内部命令解决方法 ...
- vue发送websocket请求和http post请求
直接上代码: pdf.vue <script> import SockJS from 'sockjs-client'; import Stomp from 'stompjs'; impor ...
- Predicate Format String Syntax 与字面量
字面量: 字符串:单引号或双引号扩起来: %@:系统自动添加,数字则自动去除@(): 无单双引号,系统做数字处理. Single or double quoting variables (or sub ...
- NSSting NSData 与字符集合
NSString 是为了人类阅读而存在的,必须进行编码,以使得bytes对人类有意义 String Objects An NSString object encodes a Unicode-compl ...
- pkusc2019游记
Day0 早上 6:55 的高铁,6 点就起了,好困呜呜呜 去的路上跟 memset0 坐一起,突然发现雀魂还没停服,先雀了一局(居然拿了个 1 位还飞了一个人),与此同时 memset0 切了一道毒 ...
- PHP获取一年有多少周和每周开始和结束日期
/*PHP获取当前日期是第几周和本周开始日期和本周结束日期*/ //$now = '2018-11-13';周二 public function getNowTimeInfo($now) { $str ...
- 关于 Nginx 配置的一些疑惑, Nginx 根据cookie 进行rewrite
网站目录结构如下:/public/en.html/public/zh_cn.html/public/index.php 之前所有的非静态资源请求都交给 index.php现在要把首页的请求 不走PHP ...
- nginx 访问控制之deny allow
Nginx的deny和allow指令是由ngx_http_access_module模块提供,Nginx安装默认内置了该模块. 除非在安装时有指定 --without-http_access_modu ...
- 2019-09-16 16:42:03.621946: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA Traceback (most recent cal
-- ::] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA ...