Hello. I'm trying to put some colors in my output but when I run the C program it fails to build. Could anyone explain me what's causing all these errors? https://imgur.com/a/ESQII
this is the code:
#include <curses.h>
#include <stdio.h>
int main() {
initscr();
start_color();
init_pair(1, COLOR_BLACK, COLOR_RED);
init_pair(2, COLOR_BLACK, COLOR_GREEN);
attron(COLOR_PAIR(1));
printw("This should be printed in black with a red background!\n");
attron(COLOR_PAIR(2));
printw("And this in a green background!\n");
refresh();
getch();
endwin();
}
thanks in advance. 😀