[SOLVED] Strange problem with header file
Moderator: Coders of Rage
- Bullet Pulse
- Chaos Rift Cool Newbie
- Posts: 89
- Joined: Sun Feb 21, 2010 6:25 pm
[SOLVED] Strange problem with header file
Nevermind.
Last edited by Bullet Pulse on Wed Feb 16, 2011 4:47 pm, edited 2 times in total.
-
- Chaos Rift Junior
- Posts: 345
- Joined: Tue Jan 12, 2010 7:23 pm
- Favorite Gaming Platforms: PC - Windows 7
- Programming Language of Choice: c++;haxe
- Contact:
Re: Strange problem with header file
Stop feeding the source code to your dog?
Seriously, We need to see some code if we're going to be able to help.
Seriously, We need to see some code if we're going to be able to help.
- Bullet Pulse
- Chaos Rift Cool Newbie
- Posts: 89
- Joined: Sun Feb 21, 2010 6:25 pm
Re: Strange problem with header file
Nevermind.
Last edited by Bullet Pulse on Wed Feb 16, 2011 4:47 pm, edited 1 time in total.
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: [SOLVED] Strange problem with header file
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?
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.