0

Hello,

I recently programed a hangman game, However it as flaws with are buggin me! Basically you sak the user for a guess, then the outcome is displayed... then I've cleared the screen and redraw / reload it. This wouldnt be done in the real world since rendering would take too long. Ok its not really an issue in this case, but I'd like to know how to render the screen rather than use

system("cls") and go through it all again.... does that make sence?

2
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by prog-bman
0

well this is an example :

#include <iostream>

using namespace std;

int main()

{
long int i = 0;
cout << "|" <<endl;
for (i = 0; i < 550000000 ; i++)
{}
system("cls");

cout << "/" << endl;
for (i = 0; i < 550000000 ; i++)
{}
system("cls");

cout << "-" <<endl;
for (i = 0; i < 550000000 ; i++)
{}
system("cls");








return 0;

}

However it consists of "cls" which is a danger! It would in the real world take to long to redarw elements that have not changed! So is they a way to draw only elements that have?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.