anyone can help me, how to include a "C" file which already contains main() function to another one.
Printable View
anyone can help me, how to include a "C" file which already contains main() function to another one.
hi ,,,
i think according to me it is not possible since there will be a conflict between the main functions
wish u get an answer for this question
there is no need to "include" C-file into another one, in the first place
it can be done, but there is no need to do it in 99% of the cases
Make a project. Use preprocessor conditionals to mark which main block to use. Do not #include 1 .c file in another.
The preprocessor directives you want are #if, #endif, and #ifdef. There are others you can use too.
You can call other C code from your code. Read FAQ about that.
ssharish2005