Sorry about the typo in title. Ok my school is addicted to making us mad and have blocked command promp that I brought my copy from home on a floppy disk and it blocked me. So what I need is a few alternatives for these:
cls - clears the screen
name of a program- runs the spesiphued program in he same directory
That all I use it for so help please!
Recommended Answers
Jump to PostThe best alternative is not to clear the screen. Most of the time when I see things like
system("cls")
orclrscr()
, there's no legitimate reason for clearing the screen.However, since you're using Windows you might consider the Win32 API as a reasonably portable (on Windows) …
Jump to PostFor ultimate portability you have two options:
- Don't use non-portable features
- Implement the non-portable feature for every target system
In other words, don't clear the screen and don't go full screen if you don't want to write a Windows-specific build, a Linux-specific, and a Mac-specific build.
Jump to PostOh, why can't I just extract the code widows runs when cls is called and put that in my program?
Go for it...
All 10 Replies
Narue
5,707
Bad Cop
Team Colleague
Zssffssz
-4
Junior Poster
Narue
5,707
Bad Cop
Team Colleague
Zssffssz
-4
Junior Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Zssffssz
-4
Junior Poster
vidit_X
29
Junior Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Zssffssz
-4
Junior Poster
Narue
5,707
Bad Cop
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.