千万别大改, 改点细枝末节的就行了
#include <stdio.h> int a[10] = {10,9,8,7,6,5,4,3,2,1}; #define foreach(x, y) for(int _t = 0; _t < sizeof(x) / sizeof(x[0]), (y)=x[_t]; _t++) int main(void) { int e; foreach(a, e) { printf("%d
", e); } return 0; }
3. auto类型, 不过使用场景得严格限制, 肯定不能跟c++一样. 用typeof可以实现一部分.
异常, 重载, 垃圾回收之类就算了, 加了就不是c了.
本站所有内容均为互联网搜索引擎提供的公开搜索信息,本站不存储任何数据与内容,任何内容与数据均与本站无关,如有需要请联系相关搜索引擎包括但不限于百度,google,bing,sogou 等
© 2025 tinynews.org All Rights Reserved. 百科问答小站 版权所有