Monday, 7 January 2008

Clearing the console screen in gcc


/*
* Test program to clear the screen
*
* DATE Author Rev
*
* 2008/01/08 m.patel 1.0
*
*/

#include<stdio.h>

int main (void)
{
printf ("Hi");

system("cls"); // for DOS
system("clear"); // linux

printf("Bye");

return(0);
}


if this does not work then add the protocol API after the headers


int system(const char *string);




Powered by ScribeFire.

No comments:

Post a Comment