Advertisement

Multiple cpp Files?

Started by April 09, 2000 06:37 PM
1 comment, last by node_5r 24 years, 8 months 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
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---
Advertisement
You might also try adding the keyword ''extern'' to all your global variables.

This topic is closed to new replies.

Advertisement