如果我定義這樣的常數,爲什麼會出現錯誤? 用'。'定義常量代幣
#define F.NAME "First"
#define L.NAME "Second"
printf("%s %s\n", F.NAME, L.NAME);
但是每一件事情運行平穩,如果我這樣做
#define F_NAME "First"
#define L_NAME "Second"
printf("%s %s\n", F_NAME, L_NAME);
錯誤我是。
Warning: missing white space after the macro name
Error: expected expressions before '.' token
爲什麼我不能用'。'來定義常量。 ?
因爲這是不允許的。 – Macmade
你爲什麼認爲你*不應該得到一個錯誤?同樣,你期望'#define ~~;我*高飛#$ ymb0l ~~ 42'應該工作嗎?爲什麼或者爲什麼不? – abelenky