开发者

What's the difference between char and CHAR in MSVC?

开发者 https://www.devze.com 2023-04-05 12:22 出处:网络
I hea开发者_Go百科rd 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?There is no actual differe

I hea开发者_Go百科rd 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?


There is no actual difference. CHAR is a typedef to char, 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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号