Multiple .cpp files or just one

I'm making a text RPG game in C++, and was wondering if it would be a smart idea to have the Acts split into their own .cpp files? For example main.cpp would start and setup the game while act1.cpp would do the things I want to happen in Act I then it would go to act2.cpp etc.. How would I bring my objects (player, enemy, item, and more) into the other files?

Last edited on
How do you bring objects from one function to an another in a single-file program?
In exactly the same way as with multiple files.

The executable that you run has "no files".

Then would it be possible to have different acts be in separate files?
Yes, but ...

A program does operations on data. Is each act really a different set of operations, or simply same operation with different data?
Registered users can post here. Sign in or register to post.