   a clearscrean that works in linux and windows
  i was wondering, can someone tell me how to create a function that will contain the fuctions system("cls") and sytem("clear") and the it will decide which to use according to the type of platform the program is currently running.in other words, how to create a multi platform clearscreen? 
  void ClearScreen(){#if defined(WINDOWS)   System("cls");#elif defined(LINUX)   System("clear");#endif}although there are prolly better ways to clear the console than calling System. ;  while (x<1000){  printf("\n"}} 