cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Formatting
Formatting
Nov 2, 2010 at 1:59pm UTC
Armageddon
(14)
Hi.
I was just wondering if there was any way to format the text in a C++ program (i.e. bold, italic, underline, blinking, color), that is also non-OS specific (conio.h is only for Windows right?).
Thx
Nov 2, 2010 at 2:46pm UTC
Disch
(13742)
You mean for the console?
There's no standard way, no. Libs like ncurses might have some features to do that though.
But really the console isn't designed for that kind of thing.
Nov 2, 2010 at 3:04pm UTC
Raggers
(61)
some consoles support this, there you have to printf() a special string to turn on and off a format.
like:
1
2
3
char
ESC=27; printf(
"%c[1m"
,ESC);
/*- turn on bold */
printf(
"%c[0m"
,ESC);
/* turn off bold */
But I don't know which ones do and what the commands are.
Nov 2, 2010 at 3:12pm UTC
Armageddon
(14)
oh okay, thank you anyway :)
I guess ill just stick to ASCII Art for now :P
Topic archived. No new replies allowed.