2010-03-13 135 views
16

所以我有一些类开始wmain和main有什么区别?

#include <wchar.h> 
#include <stdlib.h> 

蚂蚁有该功能wmain。

它与我在C类中常用的主函数有什么不同?

+6

儿子,我们需要谈谈主wmain之间的区别......说真的,我不知道Windows,但我GOOGLE了它和这里的链接:http://thedeveloperonline.wordpress .com/2008/04/10/main-wmain-and-_tmainwhat-the-the-deifference/ – Potatoswatter 2010-03-13 10:49:53

+0

@Potato,有图片吗? – kenny 2010-03-13 11:23:41

回答

0

main是C++中的正常程序入口点,并且以单字节字符传递命令行。 wmain是许多windows程序中用于unicode程序的替代方案,它在16位unicode字符中传递命令行。

我相信这是一个用于unicode程序的windows扩展。

+2

仅仅是Windows还是可以用于Unix编译器? – Rella 2010-03-13 11:09:07