一个小问题

Rookiekk 2017-03-12 05:48:39
请问一下宏命令行是包括哪些命令 ,是怎么定义的,是以#开头的吗
#include<>算吗请给详细一点的解答,谢谢
...全文
84 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2017-03-13
  • 打赏
  • 举报
回复
查MSDN是Windows程序员必须掌握的技能之一。 Preprocessor Directives Preprocessor directives, such as #define and #ifdef, are typically used to make source programs easy to change and easy to compile in different execution environments. Directives in the source file tell the preprocessor to perform specific actions. For example, the preprocessor can replace tokens in the text, insert the contents of other files into the source file, or suppress compilation of part of the file by removing sections of text. Preprocessor lines are recognized and carried out before macro expansion. Therefore, if a macro expands into something that looks like a preprocessor command, that command is not recognized by the preprocessor. Preprocessor statements use the same character set as source file statements, with the exception that escape sequences are not supported. The character set used in preprocessor statements is the same as the execution character set. The preprocessor also recognizes negative character values. The preprocessor recognizes the following directives: #define #error #import #undef #elif #if #include #else #ifdef #line #endif #ifndef #pragma The number sign (#) must be the first nonwhite-space character on the line containing the directive; white-space characters can appear between the number sign and the first letter of the directive. Some directives include arguments or values. Any text that follows a directive (except an argument or value that is part of the directive) must be preceded by the single-line comment delimiter (//) or enclosed in comment delimiters (/* */). Lines containing preprocessor directives can be continued by immediately preceding the end-of-line marker with a backslash (\). Preprocessor directives can appear anywhere in a source file, but they apply only to the remainder of the source file.
幻夢之葉 2017-03-12
  • 打赏
  • 举报
回复
算!百度下你就了解了
自信男孩 2017-03-12
  • 打赏
  • 举报
回复
宏定义是指以#define,#ifdef ... #else ...#endif等等这样的; #include不算是吧。

69,382

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧