I am making a novice level text based game. I want to be able to make a file with variables that read out some text. It is for the game guide. You have 3 classes you can choose from and I want to make a file for each one that would:Set levels, etc. And being able to program the levels are not the problem.
I would like to know how to import one of the .cpp files that i have in the same folder so that I could call upon a variable from that file in another file.
Eg: In my main.cpp i would like to call upon magic.cpp that is in the src class.
Why i want this:
Instead lf having 10,000 lines of code in one .cpp I would like to be able to link them.
What it will do for me:
While my games master magician is explaining the game, each class will have a different explanation. So if the player chose to be a magician i could call from the magician.cpp to give correct items, levels, and some text about being a magician inside my game.
Really hope i was descriptive enough.
Thank you, Nate.