| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4636 人关注过本帖
标题:新手菜鸟问题 关于< limits.h > 这个头文件
取消只看楼主 加入收藏
wrywry212
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-6-17
结帖率:75%
收藏
已结贴  问题点数:20 回复次数:3 
新手菜鸟问题 关于< limits.h > 这个头文件
本菜鸟刚开始自学C语言 学的是那本清华大学出版社的红色的《C语言入门经典》 其中有一个程序如下:
/* Program 2.11 Finding the limits  */
#include <stdio.h>      /* For command line input and output  */
#include < limits.h >   /* For limits on integer types        */
#include <float.h>      /* For limits on floating-point types */

int main(void)
{
  printf("Variables of type char store values from %d to %d",
                                                  CHAR_MIN, CHAR_MAX);
  printf("\nVariables of type unsigned char store values from 0 to %u",
                                                           UCHAR_MAX);
  printf("\nVariables of type short store values from %d to %d",
                                                 SHRT_MIN, SHRT_MAX);
  printf("\nVariables of type unsigned short store values from 0 to %u",
                                                         USHRT_MAX);
  printf("\nVariables of type int store values from %d to %d", INT_MIN, INT_MAX);
  printf("\nVariables of type unsigned int store values from 0 to %u", UINT_MAX);
  printf("\nVariables of type long store values from %ld to %ld",
                                               LONG_MIN, LONG_MAX);
  printf("\nVariables of type unsigned long store values from 0 to %lu",
                                                        ULONG_MAX);
  printf("\nVariables of type long long store values from %lld to %lld",
                                               LLONG_MIN, LLONG_MAX);
  printf("\nVariables of type unsigned long long store values from 0 to %llu",
                                                        ULLONG_MAX);

就是那个头文件 < limits.h > ,我在Win Tc 和C-Free 这两个编译器下 都显示:No such file or directory. 不晓得该怎么办   请前辈指点
如果这个问题很二  别笑我 呵呵           谢谢

还有麻烦推荐一个好的编译器   再次感谢
搜索更多相关主题的帖子: 清华大学 command include limits 
2012-06-17 18:52
wrywry212
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-6-17
收藏
得分:0 
回复 楼主 wrywry212
我搜了下 有这个文件
图片附件: 游客没有浏览图片的权限,请 登录注册
     但还是不行
图片附件: 游客没有浏览图片的权限,请 登录注册
  代码肯定没错 用的是书中自带的

谢谢
2012-06-17 21:21
wrywry212
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-6-17
收藏
得分:0 
回复 2楼 zklhp
我搜了下 有这个文件
图片附件: 游客没有浏览图片的权限,请 登录注册
     但还是不行
图片附件: 游客没有浏览图片的权限,请 登录注册
  

代码肯定没错 用的是书中自带的

谢谢
2012-06-17 21:24
wrywry212
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-6-17
收藏
得分:0 
谢谢各位啦  

经研究发现  是#include < limits.h >   /* For limits on integer types        */    这行代码中   limits.h前后多了空格  我把这个错误改了就ok了  但不是说空格是自动忽略的嘛 就这个小毛病看了很多资料..........   汗死了.......  
2012-06-18 20:05
快速回复:新手菜鸟问题 关于< limits.h > 这个头文件
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024138 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved