I'm trying to color at a specific point of the screen using ncurses lib.
I have written this code:
#include<curses.h>
int main(void)
{
initscr();
start_color();
init_pair(1, COLOR_BLACK, COLOR_RED);
attron(COLOR_PAIR(1));
move(10, 10);
printw(" \n");
refresh();
getch();
endwin();
return 0;
}
There is a better way to do this? Or this is the only way?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.