DEV Community

Discussion on: Terminal colors in C/C++

Collapse
 
juanitotelo profile image
Juan David Martinez Mercado • Edited

maybe
cout << "\033[c1;c2" << word << "\033[0" << endl;
where c1 is the background color number and c2 is foreground color number.
:)