Sign in to follow this  
ParanoiaComplex

Multiple .cpp files, one .h file?

Recommended Posts

All of my files call main.h, which holds my directdraw display device, surface, and palette files. The first file listed in my side panel is display.cpp. Problem is, my variables only get defined for that .cpp file, and I need them in other files. I'm declaring my LPDIRECTDRAWSURFACE7 variables as static variables, because otherwise my compiler gives me the already defined error. How do I avoid the "already defined" error, but make the variables accessible by every file in my project?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this