#error 指示詞會在編譯時期發出使用者指定的錯誤訊息並結束編輯。
C++ 使用例一:
#if !defined(__cplusplus)
#error C++ compiler required.
#endif
C++ 使用例二:
#ifndef _M_AMD64
#error Only working for x64 environment.
#endif
#C/C++ #coding #programming
#error 指示詞會在編譯時期發出使用者指定的錯誤訊息並結束編輯。
C++ 使用例一:
#if !defined(__cplusplus)
#error C++ compiler required.
#endif
C++ 使用例二:
#ifndef _M_AMD64
#error Only working for x64 environment.
#endif
#C/C++ #coding #programming