The function is supposed to draw a skull, words "You died" are supposed to slowly appear, and in the end, score and top score is supposed to pop up. (I still havent programed the top score tho).
The problem I am facing, is that the function works properly, but when I add a loop "for (int j = 0; pow(10, j) < score; j++) cout << ' ';" in the line 34, or any loop really, the few last lines after the words "You died" have generated, don't show up at all.
Thanks for the good advise!
I never heard about the flush function, and I updated my entire program with it :D.
I'll also update the function I shared.
Sadly tho, the skull problem still remains. All the lines below 28th aren't visible after the 7th iteration of the main loop.
Note that I tried both cout.flush(); and << flush; and neither helped :/.
I still don't understand, why the problem occures only after adding a while/for loop in line 34.