I have the following code in the .cpp file (not the main):
switch (opc) {
case 1:
while (jugando) {
//limpiar pantalla
h.limpiar();
//elimina scroll bar
h.nosc();
//dibuja marco
h.draw();
}
break;
}
I only leave the first case since it is the only relevant one. Then, in the h.draw () function, the only thing to do is draw a frame with gotoxy, I have the so-called
this->jugando = false;
After that line, it leaves the function and returns to the while, after that it should close the program since playing = false, however it runs again and again.
The bool
playing it I have declared it in the class of the .h file, I do not know if it should include the whole file, but the statement is simple:
bool jugando;
I would really appreciate the help.