Displaying ./code/strings/hello-curses.c#include <curses.h>
#include <string.h>
char mesg[] = "Hello, world!";
int main(void)
{
initscr();
int len = strlen(mesg);
for(int i=0; i < len; i++) {
move(i, 3*i);
printw("%c\n", mesg[i]);
}
refresh();
getch();
endwin();
return 0;
}
|