ok, im making a game in c++ and its a text based pac man game. Every once and a while, walls fall and impede your path. These walls fall randomly. I have this weird problem where walls land in places outside of my 2d array. Anyone know why this is happening?
and does this code make from 1 to 39? I think it should but I'm not sure.Code:srand( (unsigned)time( NULL ) ); intrndnum = (rand() % 39) + 1;