Inputing character strings using stream extraction operator

From: Pmb (
Date: 05/28/04

Date: Fri, 28 May 2004 17:34:03 -0400

How are character strings input from the user. For example: Suppose I have
the code
#include <iostream.h>

int main()
    char nameString[10];

    cout << "Enter your name: ";
    cin >> nameString;
    cout << "\nThe name you entered was " << nameString<< endl;

    return 0;

If I run this program and type in "Joe Shmoe" the output will be

Enter your name: Joe Shmoe

The name you entered was Joe

I assume this is because the stream was read up to the blank space between
"Joe" and "Shmoe". How do I get the whole character string read into