鱼C论坛

 找回密码
 立即注册
查看: 1408|回复: 2

[已解决]宏定义怎么编辑不了

[复制链接]
发表于 2018-12-12 13:03:50 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. // 1.cpp : Defines the entry point for the console application.
  2. //

  3. #include "stdafx.h"
  4. #include "stdio.h"
  5. #define NAME1 wo
  6. #define NAME2 ttang
  7. int main()
  8. {
  9.         char NAME1,NAME2;
  10.         printf("Hello World!\n");
  11.         printf("%slove%s",NAME1,NAME2);
  12.         return 0;
  13. }
复制代码
最佳答案
2018-12-12 13:18:02
  1. sh-4.4$ cat main.c
  2. // 1.cpp : Defines the entry point for the console application.
  3. //

  4. //#include "stdafx.h"
  5. //#include "stdio.h"
  6. #define NAME1 wo
  7. #define NAME2 ttang
  8. int main()
  9. {
  10.         char NAME1,NAME2;
  11.         printf("Hello World!\n");
  12.         printf("%slove%s",NAME1,NAME2);
  13.         return 0;
  14. }
  15. sh-4.4$ gcc -E main.c
  16. # 1 "main.c"
  17. # 1 "<built-in>"
  18. # 1 "<command-line>"
  19. # 1 "main.c"







  20. int main()
  21. {
  22.         char wo,ttang;
  23.         printf("Hello World!\n");
  24.         printf("%slove%s",wo,ttang);
  25.         return 0;
  26. }
  27. sh-4.4$
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2018-12-12 13:18:02 | 显示全部楼层    本楼为最佳答案   
  1. sh-4.4$ cat main.c
  2. // 1.cpp : Defines the entry point for the console application.
  3. //

  4. //#include "stdafx.h"
  5. //#include "stdio.h"
  6. #define NAME1 wo
  7. #define NAME2 ttang
  8. int main()
  9. {
  10.         char NAME1,NAME2;
  11.         printf("Hello World!\n");
  12.         printf("%slove%s",NAME1,NAME2);
  13.         return 0;
  14. }
  15. sh-4.4$ gcc -E main.c
  16. # 1 "main.c"
  17. # 1 "<built-in>"
  18. # 1 "<command-line>"
  19. # 1 "main.c"







  20. int main()
  21. {
  22.         char wo,ttang;
  23.         printf("Hello World!\n");
  24.         printf("%slove%s",wo,ttang);
  25.         return 0;
  26. }
  27. sh-4.4$
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-12-12 14:05:31 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-6-17 23:54

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表