Dr.Kameleon
Dr.Kameleon

Reputation: 22820

Basic terminal output using C++ - Questions

Well, the question may sound a bit too vague but here's 2 things I need to do and I'd definitely need some input on this :

So... any ideas?

Upvotes: 0

Views: 1622

Answers (2)

You probably want to use ncurses library. And ANSI escape codes can also be used for coloring.

Upvotes: 4

a.m.
a.m.

Reputation: 2171

1)

You can try Color cout , but that is not protable. I tried (ANSI escape codes) something like

cout << "\033[1;31mbold red text\033[0m\n";

cout << "\33[0;31m" << "Enter Your String here" << "\33[0m" << std::endl ;

You can also look at How do I output coloured text to a Linux terminal?

2)

Are you looking for something like watch or top like app which are showing output at the same spot.

Upvotes: 2

Related Questions