Displaying exercises/e8/files/p3.c#include <stdio.h>
#include <string.h>
#include <curses.h>
#define MAXLEN 1024
/**
* Re-use the getint() function from p2.c here:
*/
int getint(int y, int x, char *prompt)
{
}
/**
* Complete this function, it should work like getint() but read a string into
* the s parameter using the getnstr() function.
*/
void mygetstr(int y, int x, char *prompt, char s[])
{
}
int main(void)
{
/* Do not modify the code from here until the next comment: */
char s[MAXLEN];
initscr();
int x = getint(10, 10, "X? ");
int y = getint(11, 10, "Y? ");
mygetstr(12, 10, "Name? ", s);
/**
* Complete the program, clear the screen and print a "Hello, " followed by
* the name that was input at the location the user input. Then wait for
* the user to press a key to quit the program.
*/
endwin();
return 0;
}
|