hello. I'm doing a program in c++ and I need to use a system call to "clear" my screen.
for linux I use system("clear") but in windows the same is system("clr").
is there some way to find which OS is being used at the moment of execution so the program can decide whether it should use "clear" ou "clr"?
thanks in advance :)
onemanclapping 0 Light Poster
dmanw100 36 Posting Whiz in Training
onemanclapping 0 Light Poster
dmanw100 36 Posting Whiz in Training
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
onemanclapping 0 Light Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Duoas 1,025 Postaholic Featured Poster
onemanclapping 0 Light Poster
Sci@phy 97 Posting Whiz in Training
skatamatic 371 Practically a Posting Shark
skatamatic 371 Practically a Posting Shark
ArkM 1,090 Postaholic
Duoas 1,025 Postaholic Featured Poster
onemanclapping 0 Light Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
stilllearning 148 Posting Whiz
Ancient Dragon commented: Exactly what I had in mind :) +36
Duoas 1,025 Postaholic Featured Poster
ArkM 1,090 Postaholic
jmichae3
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.