I am trying to create a window and print some text to it using ncurses but I am just getting a blank screen. I believe that printw() is not working because I was able to open a working window with the same functions in the same order in a different program.
#include <stdio.h>
#include <stdlib.h>
#include <curses.h>
#include <unistd.h>
char string[] = "string";
int main(void)
{
system("clear");
int c;
initscr();
curs_set(0);
noecho();
keypad(stdscr, TRUE);
cbreak();
WINDOW *game_window;
game_window=newwin(40,40,1,1);
int num=0, highs=0;
while (TRUE) {
clear();
printw("\t%s\n", string);
printw("\tScore: %d High Score: %d\n", num, highs);
sleep(1);
break;
}
endwin();
printf("done\n");
return 0;
}