I heard that these 2 types (char and CHAR) are different in MSVC, what’s the difference between them? And which one is recommended to use if they are different?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no actual difference.
CHARis a typedef tochar, and its part of the Windows API not technically MSVC. See Windows Datatypes at MSDN.All of the (well most all) Windows API functions use parameters types that are defined in in the Win32 API header files than direct C types. I’ve always assumed that this was to be able to support multiple compilers (MSVC hasn’t always been the dominant C compiler for Windows)