[SOLVED] Strange problem with header file
Posted: Sat Apr 03, 2010 6:02 pm
Nevermind.
The Next Generation of 2D Roleplaying Games
http://elysianshadows.com/phpBB3/
Bullet Pulse wrote:Ok, so I figured it out.
When I changed the code from:
Code: Select all
bool selected; bool highlighted; Uint32 colorKey; bool set; int example;
to:
it started working fine.Code: Select all
bool selected; bool set; bool highlighted; Uint32 colorKey; int example;
Do the types have to be in a certain order?
EDIT: This problem was happening because I was using Code::Blocks. Now that I'm using VC++, I'm not having the problem anymore.
Could you provide some more information? For example, what the error was? Both of those pieces of code should work fine, whether it's minGW or MSVC++ compiled. Vaguely defining a problem and then saying you found the solution, and saying what the solution was (without finishing the description of the problem) is of little or no help to those who may end up with the same problem, because they will have no clue whether or not your problem is in any way similar to theirs.Bullet Pulse wrote:Whenever I try to declare a new variable in a particular header file within my program, the program gets screwed up.
It doesn't matter what variable type or name is, or even if it's being used, it messes up my program.
This particular header file has several bools, and a Uint already declared; but again, if I try to add more variables, the program gets screwed up.
Anyone have an idea why?