it is possible to change the colour of the font in the terminal by using come sort of code, not sure of the correct term, what im after is like cout << "hello" << endl; and hello would be bold or a different colour, can that be done?

Recommended Answers

All 4 Replies

thank you so much :) very quick reply also

#include <iostream>

using namespace std;

int main()
{
    for (int i = 31; i <= 37; i++)
    {
        cout << "\033[0;" << i << "mHello!\033[0m" << endl;
        cout << "\033[1;" << i << "mHello!\033[0m" << endl;
    }
    return 0;
}

woot! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.