We Recommend

C++ The Core Language C++ The Core Language
C++: The Core Language is for C programmers transitioning to C++. It's designed to get readers up to speed quickly by covering an essential subset of the language. The subset consists of features without which it's just not C++, and a handful of others that make it a reasonably useful language.


Posted By

whitetiger on 11/09/06


Tagged

Shell Bash clear dir rails unix c windows linux files cli ssh sessions cls


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

copyleft
jeffhung


C - clear screen


Published in: C++ 


  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 

You need to login to post a comment.