+ 3
How do I clear cout text in c++?
I've written some code that uses cout a bunch of times and I'm wondering how I could clear the generated text. Thanks in advance :)
10 Answers
+ 3
stackoverflow.com/questions/1508490/erase-the-current-printed-console-line
or use carriage return (\r) in another cout to clear the previous one.
cout<<"hello";
cout<<"\rbye";
+ 2
https://stackoverflow.com/questions/930138/is-clrscr-a-function-in-c
here. clrscr() is a dunction from conio.h library (c library)
+ 1
oh, but can you try to code onpc then? I do not really truat in SoloLearn compiler that much
+ 1
It works on PC, but not on the SoloLearn app. Might as well start programming c++ on PC.
+ 1
ohh yeah, definitely. Do not bother with c++ on the app, writing on PC gives you that full potential
0
Sorry but I can't get it to work. clrscr() gives an error saying it hasn't been declared, even though I have #include <conio.h>. /r doesn't do anything. I also tried some other stuff from the links, but they also failed.
For the record, I'm coding in the SoloLearn app.
0
I don't think you can in SoloLearn
0
your answer is another one in all of this multiple answers, why aren't my per spec? why CLS is better than the others?
- 1
multiple answers obviously... i would look up proper way.. dont just take what they say. do it per spec. i did look up i got, ("CLS");
- 3
I am not sure