You can use the same sort of format strings for mvprintw
as you would for printf
, e.g.:
mvprintw(0, 0, "%d", 42 ); // "42", decimal number output
mvprintw(1, 0, "%c", '@' ); // "@", character output
mvprintw(2, 0, "%02x", 42 ); // "2a", hexadecimal number output
mvprintw(3, 0, "Hello world: %d", 42 ); // "Hello world: 42", some text and a decimal number
The char *
that is required is the format string. See the printf
documentation for more information on how this should be used.