diff --git a/include/opp/iostream.cpp b/include/opp/iostream.cpp index d853de8..ea12be1 100644 --- a/include/opp/iostream.cpp +++ b/include/opp/iostream.cpp @@ -952,6 +952,13 @@ istream & istream::operator>>(float & val) return *this; } +istream & istream::operator>>(char & val) +{ + doskipws(); + val = get(); + return *this; +} + istream & istream::operator>>(char * p) { doskipws(); diff --git a/include/opp/iostream.h b/include/opp/iostream.h index f42d1e5..9dc3639 100644 --- a/include/opp/iostream.h +++ b/include/opp/iostream.h @@ -124,6 +124,7 @@ public: istream & putback(char c); istream & unget(void); + istream & operator>>(char & val); istream & operator>>(bool & val); istream & operator>>(int & val); istream & operator>>(unsigned & val);