开发者

Program without main() [duplicate]

This question already has answers here: 开发者_运维问答 Closed 12 years ago.

Possible Duplicate:

C program without main function ?

Can we write a c program without main() which can run and execute?

Please reply...


No, you can not. You can write a library that will be used from another program. But everything must have a beginning, and 'main' is the beginning of a C program...

(On Windows, the Win32 API specifies a WinMain, but it's the same thing, with a different name.)


No, without the main method, the linker will not know where the start of the data segment in the program will start.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜