very simple question - multiple source.cpp files

Feel like anidiot for asking this but I am trying to build a program with multiple .cpp source files. When I try to run the program it only will run my main .cpp. Is there a way to run just a speciifc .cpp at one time?
closed account (3qX21hU5)
the function int main() is where your program will aways start in a normal console app (Exceptions are stuff like WinMain and other things but that is not important here). If you want to run code from a different .cpp file you will have to run it within your main .cpp file. Now that didn't come out very clear I know, so if you could post the different source files and header you have here and the code in them I can try and help explain what you will need to do.
Multiple files could be considered as just a convenient way of handling a large quantity of code.

But it doesn't really affect how the code is executed. If you want a particular piece of code to execute, you have to actively do so, usually by calling that specific function.
Topic archived. No new replies allowed.