Multiple cpp Files?

Started by
1 comment, last by node_5r 24 years ago
hey all, I am trying to make a text based RPG. Now I do not want to have all the code in one large cpp file because it would be to hard to maintain and it would be pron to lots of errors. So I was wondering how i can use multiple cpp files in one exe. So can anyone help me with this?? Thanx node_5
Advertisement
Basically you just add more than one *.cpp file to your project and prototype all of your functions in the header file so all of the *.cpp files can access the functions.

You also need to define all of your data structures and such in your header file.
---Ranok---
You might also try adding the keyword ''extern'' to all your global variables.

This topic is closed to new replies.

Advertisement