论坛首页· 友情链接申请·申请版主· 广告投放· 道具中心· 设为首页· 收藏本站
发新话题
打印

why?

why?

新建一个空的工程,在里面添加如下代码
#include <ctype.h>
using namespace std;

编译一下,竟然显示 'std' : does not exist or is not a namespace

而加上一句,变为:

#include <ctype.h>
#include <iostream>
using namespace std;

编译一下,正常。
不知道为什么。

TOP

std名称空间在ctype.h中没有定义,但是在iostream中定义了

TOP

ls正解,现在vc的<iostream.h>中也未定义std,如果用此头文件再使用using namespace std 也会报错
从易做事,从简做人。埋头做事,低头做人。不予他求,只扪自力。休言酸骚,命运求己。

TOP

把ctype.h改成cctype就行了

TOP

我去试试

TOP

发新话题