开发者

Program without main() [duplicate]

开发者 https://www.devze.com 2023-01-18 15:54 出处:网络
This question already has answers here: 开发者_运维问答 Closed 12 years ago. Possible Duplicate: C program without main function ?
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

精彩评论

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