C - clear screen


/ Published in: C++
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. // Funziona sui terminali compatibili ansi
  7.  
  8. fprintf(stdout, "\033[2J"); // Cancella lo schermo
  9. fprintf(stdout, "\033[1;1H"); // Posiziona il cursore sulla linea colonna 1
  10.  
  11. return EXIT_SUCCESS;
  12. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.