打印

在ads中的错误,

[复制链接]
2567|8
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
luocolor|  楼主 | 2007-10-19 02:01 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Error:C2312E:storage class 'typedef' not permitted in context <formal parameter type declaration> - ignored stdlib.h line 38
双击,进入stalib.h中,line 38为typedef那行。
#if defined(__cplusplus) || !defined(__STRICT_ANSI__)
 /* unconditional in C++ and non-strict C for consistency of debug info */
  typedef unsigned int size_t;
#elif !defined(__size_t)
  ......
#endif

网上也有人遇到相同的问题,但没有指明解决方法?哪位遇到过么?

相关帖子

沙发
wishcom| | 2007-10-19 09:13 | 只看该作者

size_t这个类型可能已经在什么地方定义过了

使用特权

评论回复
板凳
luocolor|  楼主 | 2007-10-19 10:20 | 只看该作者

但很奇怪,size_t命名就是ads提供的li

但很奇怪,size_t命名就是ads提供的lib中的,和我的程序有什么关系么?

使用特权

评论回复
地板
tobebest| | 2007-10-19 10:42 | 只看该作者

没遇见过,帮顶

使用特权

评论回复
5
luocolor|  楼主 | 2007-10-19 13:10 | 只看该作者

很恼火啊,所以资料都翻遍了都找不到方法。

使用特权

评论回复
6
阿南| | 2007-10-19 21:38 | 只看该作者

楼主不要着急,可能是其它地方的错误引起.你把前因后果都说

大伙能否帮您分析和判断

使用特权

评论回复
7
老狼| | 2007-10-20 00:01 | 只看该作者

the type size_t is defined as unsigned int

Arrays and pointers 
The following statements apply to all pointers to objects in C and C++, except pointers to members:

the type size_t is defined as unsigned int

明白了么?

使用特权

评论回复
8
老狼| | 2007-10-20 00:05 | 只看该作者

其实好多问题不要急

按下心来,这个说明就是在ads的 online book 中。

使用特权

评论回复
9
luocolor|  楼主 | 2007-10-20 01:48 | 只看该作者

多谢各位 了!

多谢各位了!

因为提示出错的地方是ads的编译器使用的stdlib.h,所以我也不好去改动。

很奇怪的是,我重新建立了一个工程。把以前有问题的工程一个文件一个文件的copy过去,后来编译的时候,居然没有这个问题了。

现在没有时间去深究为什么了。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

40

主题

105

帖子

0

粉丝