[C++] Coloured text and background
3 posters
RUSES :: Programming :: Help
Page 1 of 1
[C++] Coloured text and background
Is there a surefire way to get different coloured text on all platforms or should I write off those marks now?
Google is full of rubbishness in this area and maybe others would find a clear answer useful on here too for the cw. Anyway cheers
Google is full of rubbishness in this area and maybe others would find a clear answer useful on here too for the cw. Anyway cheers
lee- Posts : 22
Join date : 2012-02-23
Re: [C++] Coloured text and background
I don't think C or C++ understand colours, they need external libraries. I know that in Windows you can use system() calls or include <conio.h> and format using cprintf. I'm not sure about Linux but you can't use those same commands so I don't think you can do it for the coursework I'm afraid. :/
I guess if you could detect which OS is being used you could switch between commands but that could be a lot of work. :/
I guess if you could detect which OS is being used you could switch between commands but that could be a lot of work. :/
Charlie- Posts : 16
Join date : 2012-02-23
Re: [C++] Coloured text and background
I thought that might have been the case. No colours it is then
cheers I think I saw a quick way of testing what os you had (like searching for or something similar)
cheers I think I saw a quick way of testing what os you had (like searching for or something similar)
lee- Posts : 22
Join date : 2012-02-23
Re: [C++] Coloured text and background
There is a way of doing it in C++ to the console...I think you need to output the VT100 escape codes to do it...
Have an experiment with them see what you find.
Have an experiment with them see what you find.
DiJuMx- Posts : 7
Join date : 2012-02-29
RUSES :: Programming :: Help
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum