Run-Time Check Failure #3 - The variable 'iPlayerLocationsY' is being used without being initialized.
Is that your problem? The lin ypu posted shouldn't have any problems.
That an error like this occurs doesn't mean that the last thing you added is the reason why. It was always there but now (thru an innocent change) it's getting obvious
Everything worked fine before i decided to use a vector instead of an array, i tested the game and everything worked fine.
Is there some problem that could occur when transfering from using a bool array to a vector? Since the int vector worked with my old int array code, i haven't changed anything with the old bool array code as i suspected it would work ok.
Ok...I just tested something and now i am completely puzzled. I changed one of my int vectors to a int array and now it works, with the bool vector there. So it seems to cause this problems when i have 3 vectors...
i told you vector<bool> is user-define of vector and differ with vector ! i dont see your code and i cant have any idea . but in c++ have another class for boolean type : bitset
check it
As long as you stay within the limits of the vector (it doesn't increase automatically!) everthing should be ok. The problem is certainly not the vector. Uninitialized variables are more a problem...
@ ahura24
He created a 2d vector. You can't do that with bitset
:)) hey man why you use SFML :)) almost everyone i know problem with this game engine .
why you dont exam ClanLib . i work with SFML and ClanLib , my idea ClanLib is too better
Dude it can't be the variable, it's declared in my main loop and worked no problem. The error says it hasn't been declared in the third if statement i use it, the error is bogus. You say i should stay within the limits of vector, well when i use 2 vectors it works, at 3 it doesn't, so do i have to increase this somehow or?
@ahura
SFML was recomended to me by loads of people for 2d game programming, i haven't had any problems with it and it's been great.
Lol i deleted the code the error was complaining about and i get the exact same error that points at code that doesn't exist. And the code isn't needed to run the game properly i just put it there for convenience.