MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / main

Function main

base_code/macro.cpp:37–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 :(b))
36
37int main() {
38 /**
39 * (#)字符串操作符
40 */
41 exp("hello");
42 exp1(hello);
43 string str = exp2( bac );
44 cout << str << " " << str.size() << endl;
45
46 /**忽略传入参数名前面和后面的空格
47 * 当传入参数名间存在空格时,编译器将会自动连接各个子字符串,
48 * 用每个子字符串之间以一个空格连接,忽略剩余空格。
49 */
50 string str1 = exp2( asda bac );
51 cout << str1 << " " << str1.size() << endl;
52
53 /**
54 * (##)字符串操作符
55 */
56 const char * gc_hello = "I am gc_hello";
57 expA(hello);
58 expB(hello1); // #define gc_hello1 "I am gc_hello1"
59
60 char var1_p[20];
61 char var2_p[20];
62
63 // 连接后的实际参数名赋值
64 strcpy(var1_p, "aaaa");
65 strcpy(var2_p, "bbbb");
66
67 /**
68 * (\)续行操作符
69 */
70 int max_val = MAX(3,6);
71 cout << max_val << endl;
72 return 0;
73}

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected