Update console without flickering - c++ : <p>I'm attempting to make a console side scrolling shooter, I know this isn't the ideal medium for it but I set myself a bit of a challenge.</p>

<p>The problem is that whenever it updates the frame, the entire console is flickering. Is there any way to get around this?</p>

<p>I have used an array to hold all of the necessary characters to be output, here is my <code>updateFrame</code> function. Yes, I know <code>system("cls")</code> is lazy, but unless that's the cause of problem I'm not fussed for this purpose. </p>

<pre><code>void updateFrame()
{
system("cls");
updateBattleField();
std::this_thread::sleep_for(std::chrono::milliseconds(33));
for (int y = 0; y &lt; MAX_Y; y++)
{
    for (int x = 0; x &lt; MAX_X; x++)
    {
        std::cout &lt;&lt; battleField[x][y];
    }
    std::cout &lt;&lt; std::endl;
}
}
</code></pre>
