Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's Wrong Here?
Message
General information
Forum:
Visual C++
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00549825
Message ID:
00550506
Views:
22
>I want to do a DOS CLS command in JAVA. Since it seems to be
>impossable in JAVA, somone suggested writing a C++ EXE that
>clears the screen, then calling it from JAVA. Great idea, except
>that I can't get this to work:
>
>
>#include
>void main()
>{
>clrscr();
>}
>
>

>
>I'm not a C/C++ developer, so I have no idea why this isn't compiling.
>Any help would be great.
>
>Thanks

The "clrscr" function does not exist!

Try this instead:

//////////////////////////////////
<CODE>
#include "stdlib.h"

int clrscr() {
	return system("cls");
}</CODE>
//////////////////////////////////

Hope this helps!

Good luck, Stephane.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform