为什么不能使用using namespace std命名空间
我的程序中使用命名空间语句时出现错误:使用using namespace std;语句时,编译时出现错误,错误提示是:
error C2871: 'std' : does not exist or is not a namespace,
不知为什么,可是这是教材上的代码,而且这句代码很多的教程上都有的,不会错的,真不知为什么?
[解决办法]
要么用
#include<iostream>
#include<stdio.h>
using namespace std;
要么用:
#include<iostream.h>
#include<stdio.h>
//using namespace std;