#include
int main()
{
system("cls");
printf("It's a cruel world! I will eat worms");
printf("\n\n\n");
printf("Jan. 20, 2013, The Great Correction will come");
printf("\n\n\n");
printf("Are you talking to me??");
printf("\n\n\n")
}
does this work? i am taking a programing class and because i use linux the way one compiles is a bit different and some of the system commands are different too like cls works in windows but not in linux.
thanks
Previously known as kAlug.
the RETURN 0; do?
By declaring your function as int main() you are telling your compiler that this function will return an int. The return 0; just fulfills this.
Our professor wants us to use cls. but is clear cross platform?
why is there a main (void)
what does the void part do?
EDIT: Clear does not work with the compiler and setup we atre using.
We in my class are using one of the last 16bit microsoft compilers called C Optimizing Compiler Version 6.0. We are using to make the .c document MS-Dos Editor. this has posed a problem for those using 64bit windows. so far dosbox has not failed me yet
"C 6.0 released in 1989. It added global flow analysis, a source browser, and a new debugger, and included an optional C++ front end.
"
source: http://en.wikipedia.org/wiki/Microsoft_C_compiler#16-bit_versions
Try this:
Previously known as kAlug.
this is an answer to a question i was just about to ask :3
kAlug you are made of win and awesome!
EDIT: Later
That command doesnt work. sorry but it defaults to the CLEAR command and did not work at all on dosbox or in windows using the compiler we are given for class.
But try compiling it with
/D_WIN16=1
.Previously known as kAlug.
or with mingw gcc -D_WIN16=1
your friendly neighbourhood moderator Zach Thibeau