//EE 312 //Roger Priebe //9/5/18 // //This program demonstrates clearing a screen in Windows and Linux // #include #include #include #ifdef linux #define LINUX true #define WINDOWS false #endif #ifdef __WIN32__ #define LINUX false #define WINDOWS true #endif int main(int argc, char *argv[]) { printf("before\n"); if (WINDOWS) { system("cls"); //Windows only printf("WIN\n"); } else { system("clear"); //Linux only printf("LINUX\n"); } printf("after\n"); return 0; }