Notation I can't understand in Quake source code (C)

感情迁移 提交于 2019-12-03 12:57:37
frast

These are probably multi-use includes. They can be used like so:

struct {int y; int y;} points[] = {
#include <points.inl>
};

The contents of a header do not have to be valid C; the C preprocessor will insert them wherever the #include directive is found, such as in the middle of a struct initialization in another source file. As long as it's valid C by the time it actually gets to the compiler, that's all that matters.

They can be used to initialize arrays.

You could use them like this:

int array[N][2] =
#include <header_file>
;
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!