anyone can help me, how to include a "C" file which already contains main() function to another one.
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
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
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.
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.
You can call other C code from your code. Read FAQ about that.
ssharish2005