vendredi 1 mai 2015

Cursor position On the console need help on this code?

how to change the position of the cursor ina loop. because on each cin it remains on the same position.. i have to move the curse in the middle of the console for each input.. how do i do it?

 int j;
 do{
     cout<<"Enter names"<<endl;
     got(24,40);
      j++;
    }while(j<4);

for changing the position of the cursor my function is

void gotoxy (short int x,short int y)
  {COORD cur={x,y}; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),cur);}

Aucun commentaire:

Enregistrer un commentaire