通常,如果一個*/
(塊註釋閉合)存在於代碼沒有/*
(塊註釋開口),編譯器產生錯誤。解釋爲什麼代碼編譯成功
但是,爲什麼編譯不產生在以下情況下的錯誤?從一開始
/*
#ifdef abcd
printf("what ever it is");
#endif */
您刪除了「/ *」和代碼不能編譯:
#include <stdio.h>
int main(void)
{
#ifdef abcd
printf("what ever it is");
#endif */ --> the problem with this stray '*/' after #endif
return 0;
}
這是很難明白你在這裏問... –
請修改你的問題,我們不真正明白你的問題是什麼。 – Cristy