C ++ Common Errors: 1. c2146 errors are usually caused by the absence of the type specifier before the variable definition, which may be due to spelling errors or missing header file references.
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 ents and Settings \ Aldous. Liu \ Desktop \ 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 ents and Settings \ Aldous. liu \ Desktop \ 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 \ Desktop \ ntservice2 \ ntservice2 \ ntservice2.cpp 13 ntservice2
Move the definition of methods and variables to the beginning before using this method and variables.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service