本文介绍了什么是用C这种风格的语法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 通过 sys.c 线123: 的void * sys_call_table的[__ NR_syscalls] ={ [0 ... __NR_syscalls-1] = sys_ni_syscall,#包括LT&; ASM / unistd.h中&GT;}; sys_call_table的是一个通用的指针数组,我可以看到。然而什么是符号: [0 ... __NR_syscalls-1] 什么是 ... ? 编辑:结果我在这里学会了另一种C招:的#include&LT; ASM / unistd.h中&GT; 将 preprocessed 的并与其内容替换,并且分配到 [0 ... _NR_syscalls-1] 。解决方案 这是使用初始化 指定初始化 。 范围根据初始化一个GNU GCC扩展。 It is not portable. Compiling with -pedantic with tell you so.How does it work here?The preprocessor replaces #include <asm/unistd.h> with its actual contents(it defines miscellaneous symbolic constants and types, and declares miscellaneous functions) in the range based construct, which are then further used for initializing the array of pointers. 这篇关于什么是用C这种风格的语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!