TITLE: Using input streams; reading lines PROBLEM: hs3@irz.inf.tu-dresden.de (Hans-Peter Stoerr) If I try for instance: char s[100]; cin >> s; Could anyone tell me if there's a way to make cin read a *whole* line, instead of the first word only? (I know there are things like cin.getline(s,100); but I want to use the << operator for his simplicity.) RESPONSE: steve@taumet.com (Steve Clamage), 11 May 93 The >> input operators do formatted input. If you want to read an entire line, you have to use "get" or "getline". For example: char s[SIZE]; cin.get(s, SIZE); // does not extract the newline cin.ignore(INT_MAX, '\n'); // discard through next newline cin.getline(s, SIZE); // discards the newline