• Advertisement
Sign in to follow this  

Simple Question, But Can't seem to Find the Answer

This topic is 4143 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I got a really simple question that I can't seem to find ANYWHERE. I am splitting my project into multiple files, and I have put all my variables into a header file. Hoow can I make the variables accessible to EVERY .cpp file? When I add the header file to a single .cpp file, the variables come up as unidentified in the other .cpp files, but when I put the header file in all of the .cpp files, the compiler says that it is a multiple definition. In case it matters, I am using VC++6.0.

Share this post


Link to post
Share on other sites
Advertisement
are you sure you are including it before it gets used.
I recommend including the file with all the variables very first.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement