C++常見錯誤:1. C2146錯誤通常原因是變數定義前的類型說明符找不到,可能因為拼字錯誤或未加入需要的標頭檔引用導致
2. Error 1 fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? c:\documents and settings\aldous.liu\案頭\myservice1\myservice1\firstservice.cpp 170 FirstService
屬*->C/C++->Precompiled Headers->Create/Use Precompiled Headers->Not Using Precompiled Headers
3. Error 1 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'LPWSTR' c:\documents and settings\aldous.liu\案頭\ntservice2\ntservice2\ntservice2.cpp 13 NTService2
屬*->General->Use Multi-Byte Character Set
4. Error 1 error C2065: 'ServiceMain' : undeclared identifier c:\documents and settings\aldous.liu\案頭\ntservice2\ntservice2\ntservice2.cpp 13 NTService2
將方法、變數的定義移到最先使用此方法、變數之前