R
Rex
hai all,
itz just a query,can i have two main function in a C program(1 file)
itz just a query,can i have two main function in a C program(1 file)
NO, because execution starts with main, and ANSI C programs areRex said:hai all,
itz just a query,can I have two main function in a C program(1 file)
itz just a query,can i have two main function in a C program(1 file)
hai all,
itz just a query,can i have two main function in a C program(1 file)
Rex wrote on 13/08/04 :
No. main() is just another function. You can't have 2 functions with
external linkage with the same name in a C program.
Rex said:hai all,
itz just a query,can i have two main function in a C program(1 file)
Paul Heininger said:Yes, there can be two main functions in a C program. Using preprocessor
directives, only one can be compiled during a single compilation (a/k/a
translation).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.