[Error] While iterating through vector

Hello,

I have a weird bug i don't know how to solve it.
I have :

int i = 0;
int id = 0;

for (int y = 0; y < (int)m_size.y; y++)
{
for (int x = 0; x < (int)m_size.x; x++) {

Tile tile;

tile.id = id;
id++;

tile.vertex_pos[i] = sf::Vector2f((x * COORD_SCALE) + m_position_offset.x, (y * COORD_SCALE) + m_position_offset.y);
i++;

[...]
}
}


But var i when it supposed to take value = 3, its value is something like 105948092

I use SFML i'm in debug mode and the program compiled correctly before.
Any hint ?
Thank you!
Last edited on
int y = 0; y < (int)m_size.y;
see anything funny?
Not really, i tryied with a 'real' int for the size but still not working properly.
Maybe it s something else :O
Topic archived. No new replies allowed.