Hi!
I want to create a fast clear screen code. This code clears only one row and I don't know why. PLEASE HELP!!!
Here's my code:
I want that printf will be used only once and that the program will clear the selected rows and cells in one shot.Code:void clrscr (short x, short y, short EraseLength, short NoOfLines) { short i = 0, j = 0; char Clear[30][85]; for (i = 0; i <= NoOfLines; i++) { for (j = 0; j <= EraseLength; j++) { Clear[i][j] = ' '; } Clear[i][j] = '\0'; } Clear[i][j] = '\0'; gotoxy (x, y); printf ("%s", Clear); }