previous | start

## Getting Input from the Graphics Window

- You cannot use `cin` to get input from a graphics window.
- To read text input from a graphics window, use the `get_string()` method.

  >     string response = cwin.get_string(prompt);

  Example:

  >     string name = cwin.get_string("Please type your name:");

- The prompt and input occurs in an input area at either the top or bottom of the graphics window (depending on your system).
- To read numerical data input from a graphics window, use the `get_int()` or `get_double()` method.

  >     int age = cwin.get_int("Please enter your age:");

- To prompt the user for a mouse input, use the `get_mouse()` method.

  >     Point center = cwin.get_mouse("Enter center of circle:");

previous | start