3 ms·
If I am understanding you correctly, I believe that it is possible in C, using macros. If you include the following in each file: #ifndef MAIN_ALREADY_DEFINED_
by bioengineer 18y ago
If I am understanding you correctly, I believe that it is possible in C, using macros. If you include the following in each file:
#ifndef MAIN_ALREADY_DEFINED__
#define MAIN_ALREADY_DEFINED__
int main(){
/* file specific stuff */
}
#endif
Disclaimer: I wouldn't actually do this in practice...