I'm actually put in a big project. My first step to understand the code was to search the
You can't have multiple
main functions for a single executable. There are several possibilities.
If doing a build builds only a single application, then only one of the
main functions will be compiled. (Or none, if there's an option to build a library rather than an executable.) There are probably options that determine which one to build, depending on which variant of the application you want, the target system, or something else.
Or perhaps the application consists of multiple executables, with one
main function for each one.
If running the build doesn't take too long, a trick I've used to determine which of several source files is actually compiled is to temporarily add
#error directives, like:
#error "TEMPORARY: This is /full/path/to/source.cpp"
The resulting error message will tell you which source file was actually compiled. (You can also use
#warning directives if your compiler supports them.)