Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

Newbie needs help with variables

This topic is 6598 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

If I understand what you are saying, then all you need to do is when you are declaring the variable in the H file, just declare
extern bool BIT555 instead of
bool BIT555

Hope that works!

------------------
http://qoy.tripod.com

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi everybody !!!
My problem is:
I'm starting to do things in DirectX 7 and VC++ 6.0 and I was doing things about the 16 bits video problem (555, 565, RGB, GRB...) and I saw a function with macros on a post and based on that code I programmed the mine. What is getting me crazy is that I want to put in separate files and the macros on the .h file that I use on the code (where the functions to manange the video are) file and the run (where the GAME CODE only is) file. Those macros utilize a variable named BIT555 that is boolean type and define if its 555 or 565. If I put the declaration of the variable (that is utilized by a function named 16BITS()[on the code file], this one returns if its 555 or 565 on the BIT555 var and a structure that is utilized on the macros either, to see if its RGB or BGR...)
on the .h file an error ocurs "redeclaration of var on the run file..." when linking, if I put it on the code file "var not declared..." when compiling the .h file. If I move the macros to the code file "undeclared identifier..." when compiling the run file (that use the macros to get right rgb value and put then too)
I don't know what to do. Can anyone tells me , please ?
Sorry about my english, I'm brazilian...

Thanks

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hei thanks Qoy !!!
It worked...
My code compiled and linked ( it weren't doing this !) but didin't run (I did so many functions at the same time and because of that problem I couldn't TEST them) I will continue to fix the run-time problems, thanks again !!!
Nepheus

Share this post


Link to post
Share on other sites