开发者

int _tmain(int argc, _TCHAR* argv[]) [duplicate]

开发者 https://www.devze.com 2023-03-26 03:12 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: What is开发者_JS百科 the difference between _tmain() and main() in C++?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

What is开发者_JS百科 the difference between _tmain() and main() in C++?

what is the difference between int _tmain(int argc, _TCHAR* argv[]) and int main(int argc, char** argv)?

I am not clear of the difference.


_tmain is the Microsoft-specific wrapper around "main()". You can use it with either 8-bit ASCII or 16-bit Unicode. Here's the MS documentation for it:

http://msdn.microsoft.com/en-us/library/6wd819wh%28v=vs.80%29.aspx

You can also use _tmain, which is defined in TCHAR.h. _tmain will resolve to main unless _UNICODE is defined, in which case _tmain will resolve to wmain.


_tmain is the unicode version of main. I think this is a MS only extension though.

0

精彩评论

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