今天写了个程序用了如下代码
#include <iostream.h>
using namespace std;
然后编译时出现 error C2871: 'std' : does not exist or is not a namespace
查了一下,原来 C++有两个不同版本的头文件。引入名字空间这个概念以前编译器用的是#include <iostream.h>,
而引入名字空间的概念以后std名字空间的头文件名字变成了<iostream>。
<iostream.h>是比较老的C++的头文件的版本,而namespace是98年才被加入C++标准的,所以<iostream.h>里面是没有std这么个命名空间的,当使用 <iostream.h>时,相当于在c中调用库函数,使用的是全局命名空间,也就是早期的c++实现。头文件<iostream>则没有定义全局命名空间,使用时必须使用namespace std才能正确使用cout。
vc6.0支持这个两个版本. 不过现在都用<iostream>了
所以只需将以上语句改为:
#include <iostream>
using namespace std;
或者是 #include <iostream.h>即可。
分享到:
相关推荐
using namespace MSXML2; #import "C:/Program Files/Common Files/MSSoap/Binaries/mssoap30.dll" \ exclude("IStream", "IErrorInfo", "ISequentialStream", \ "_LARGE_INTEGER", "_ULARGE_INTEGER", ...
解决/root/.Xauthority does not exist
安装sap gui 750后,打开smartforms或scriptforms提示:CSapEditorCtrl::GetObject: Object 13 does not exist的解决方法:安装此安装包后即可解决问题
“Controller does not exist.”登陆后台突然是这个提示登陆不上后台了。 入口为:index.php?m=admin 这是控制器不存在错误 应该是改过了系统文件,或者是上传文件缺失。 可以这样做,把phpcms/ 目录下的所有文件和...
mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
smartforms 文本提示:CSapEditorCtrl::GetObject: Object 13 does not exist-附件资源
ERROR Error: [@ant-design/icons-angular]: the icon redo-o does not exist or is not registered. at IconNotFoundError (ant-design-icons-angular.js:159) at MapSubscriber.project (ant-design-icons-angular...
FILE_DOES_NOT_EXIST HOOK zwCreateFile
解决SAPGUI800使用SMARTFORMS创建/编辑文本时报错CSapEditorCtrl::GetObject: Object 15 does not exist的对应版本SAPscript Legacy Text Editor patch安装包
Code::Blocks – The file does not exist. 1. Code::Blocks Could not open the file '/home/strong/codeblocks_work/Fire-master/src/bubble/config.cpp'. The file does not exist. 2. Build log ...... g++: ...
精通pl/sql part2
今天项目优化过程中,mysql有个问题The user specified as a definer (‘wx_root’@’%’) does not exist 查了一下,意思是执行sql无权限。 看了下数据库用户是quoters 而sql没有所属权。那就找原因了。发现sql执行...
NULL 博文链接:https://banner.iteye.com/blog/613081
我们在日常学习或者使用docker的时候可能会遇到下载安装镜像速度慢的问题,这里我们就得添加以下中国的阿里云镜像就会速度加快 添加阿里云镜像 阿里云网站 按照命令即可,也可以手动创建/ect/docker/daemon.json来用...
安装sap gui 750后,打开smartforms提示:CSapEditorCtrl::GetObject: Object 13 does not exist的解决方法 一、安装sap gui 750后,打开smartforms或scriptforms提示:CSapEditorCtrl::GetObject: Object 13 does ...
一般情况都是因为文件的上级目录不存在浏览权限。...详细说明:Serv_U安装设置以及530 Not logged in, home directory does not exist解决方法安装程序尽量采用最新版本,避免采用默认安装目录,设置好serv-u
SAPGui 800 - 64bit Smartforms报错 CSapEditorCtrl::GetObject:Object does not exist
今天小编就为大家分享一篇关于Mysql:The user specified as a definer ('xxx@'%') does not exist的解决方案,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧
models.py — 定义数据表 from django.db import models # Create your models here. class User(models.Model): username = models.CharField(max_length=20, primary_key=True) password = models.CharField(max...