I have the problem of the flashing screen and I know that I need to use double buffering to fix it, but I don't know how and where to add it in my game. If for some reason I can't use it, is there any other way of reducing the flashing, because with the bigger maps it's getting worse. Here is part of the code:
`const char HEIGHT=11, WIDTH=54;
unsigned char maze[HEIGHT][WIDTH]={
"##############################",
"# !# # ### ## #",
"# ### ### # !! ### ####### # GAME OF THRANS",
"# # ##### ## # !! # #",
"######## # ## # #### # # R-restart Q-quit",
"# ! # # # # # # # M-menu",
"### ## # ### # #! #### ######",
"# !# # ## # #### # # !! # W",
"# #### ## ## # # # #### # Controls: A-S-D",
"# ## # # #",
"##############################",
};
enemy1.x=14;
enemy1.y=7;
enemy2.x=22;
enemy2.y=9;
enemy3.x=10;
enemy3.y=3;
srand(time (NULL));
while(on){
maze[ppy][ppx]=playerSprite;
maze[gpy][gpx]=goal;
maze[enemy1.y][enemy1.x]=enemy1.sprite;
maze[enemy2.y][enemy2.x]=enemy2.sprite;
maze[enemy3.y][enemy3.x]=enemy3.sprite;
for(int y=0; y<HEIGHT;y++){
cout<<endl;
for(int x=0;x<WIDTH;x++){
cout<<maze[y][x];
}
}
for(;;){
randNum=rand()%randNumMax+1;
cout<<endl;
movement=getch();
switch (movement){
case'w':
if (maze[ppy-1][ppx]!='#' &&(maze[ppy-1][ppx]==' '||(maze[ppy-1][ppx]=='G','N','M','Y','!'))){
maze[ppy][ppx]=' ';
ppy--;
moves++;
if (maze[ppy][ppx]=='!'){
Beep(400,150);
points++;
}`