⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 一本语言类编程书籍
💻 CPP
字号:
// Exercise 10.4 More applications of preprocessor directives. Since val is going to be
// a string, then we have to use the # within the  using the #define macro as shown.
// The solution uses the files from Exercise 10.3, with the following amendments
// to main.cpp:

// main.cpp
#include "printthis.h"
#include "printthat.h"

//#define DO_THIS        // undelete to #define the token

#ifdef DO_THIS
#define PRINT(val) print_this(#val);
#else 
#define PRINT(val) print_that(#val);
#endif

int main() {
  PRINT(abc)
  return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -