| DaveCas (9) | ||||
|
Hello, I have this code which compiles correctly but for some reason when I run the program the output is:
And "Hello" is in regular text color. I have tried googling this but nothing relevant comes up. I'm thinking that I may have to install something but I'm not too sure about that. Here is the code:
I am using Linux Mint 14 (based on Ubuntu 12.04) with g++ compiler. Thanks. | ||||
|
|
||||
| jlb (170) | |
|
Probably because color is Windows specific. | |
|
|
|
| usandfriends (186) | |||
dont use system("...");
use this, I use it and it works well:
| |||
|
Last edited on
|
|||
| DaveCas (9) | |
|
Well that's good to know... I would think Linux would have color too. Thanks. | |
|
|
|
| DaveCas (9) | |
| The bottom link is for windows, will it work for linux? | |
|
|
|
| usandfriends (186) | |
| I have no idea, you can try it. | |
|
|
|
| DaveCas (9) | |
| tried it... doesn't work. windows.h is not for linux and neither is concol.h which is in the second code. | |
|
Last edited on
|
|
| DaveCas (9) | |
|
ok I found how to do it http://stackoverflow.com/questions/2616906/how-do-i-output-coloured-text-to-a-linux-terminal when I googled it, everything was for windows but here is one for linux and it works. Thanks for the help. | |
|
|
|