I have a main c++ file with all my integer values, then I have a seperate c++ file with my algorithms for my battle function. May seem like a simple question, but how do I get the values from my main c++ file and use them in the other one and visa versa? Code snippets welcome, and help would be graciously accepted.

Recommended Answers

extern the variables in question. Look it up...

Jump to Post

All 2 Replies

extern the variables in question. Look it up...

commented: Made me look, but still very helpful +1

Perfect, so glad people like you exist in this community =D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.