getline(cin, name);

Is what I use to get the string name. I'd like to make the program limit the name to eight characters or less, truncating the name if it's too long. I'm a bit of a newbie, help would be appreciated.