|
|
#include <ocurses.h>NOTESint getstr(str) char str;
EXAMPLE
#include <ocurses.h>main() { char str[256];
initscr(); cbreak(); /* Explained later in the section "Input Options" */ addstr("Enter a character string terminated by <Return>:\n\n"); refresh(); getstr(str); printw("\n\n\nThe string entered was \n'%s'\n", str); refresh(); endwin(); }
Assume you entered the string 'I enjoy learning about the UNIX system'. The final screen (after entering RETURN) would appear as follows:
Enter a character string terminated by <Return>:I enjoy learning about the UNIX system.
The string entered was ´I enjoy learning about the UNIX system.'
$[]