'Coloured cout not working XCode macOS 12.0.1
I am currently coding a version of Wordle in C++.
I am trying to change the colour of text for outputs and I have no idea why this is not working.
Any help is much appreciated! Washy x
#include <iostream>
#include <stdlib.h>
#define RESET "\033[0m"
#define BOLDGREEN "\033[1m\033[32m" /* Bold Green */
#define BOLDYELLOW "\033[1m\033[33m" /* Bold Yellow */
using namespace std;
int main(int argc, const char * argv[]) {
cout << "Welcome to WORDLE" << endl << endl;
cout << "Guess the WORDLE in six tries. \n\nEach guess must be a valid five-letter word. Hit the enter button to submit. \n\nAfter each guess, the color of the tiles will change to show how close your guess was to the word." << endl << endl;
cout << BOLDGREEN << "hello" << RESET << endl;
EDIT:
Here is the output:
Welcome to WORDLE
Guess the WORDLE in six tries.
Each guess must be a valid five-letter word. Hit the enter button to submit.
After each guess, the color of the tiles will change to show how close your guess was to the word.
[1m[32mhello[0m
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
