For some reason, Visual studio will not step into this code and I cant see the contents of the variable k and p
for(int k=0; k<6; k++)
{
for(int p=0; p<6; p++)
{
if(k=0)
{
levelToDraw[k][p] = LevelOne[k][p];
}
else
{
levelToDraw[k][p] = LevelOne[k-1][p];
}
}
}
From what I can see
is an infinite loop without visible side-effects since
kis always reset to zero inside the loop. (note the accidental assignment). Infinite loops without visible side-effects are undefined behavior in C++. This means the compiler can do anything at all. It can throw away the loop, for example, meaning that you can’t enter it – and this is likely what happened. Since it’s undefined behavior, it could even cause the machine to catch fire.