exact mechanics of istream::operator>> to string
I'm just not seeing this:
std::istringstream stream(somestring);
string temp;
stream >> temp;
In the last line, what is the exact fun开发者_JAVA技巧ction called? I can't find it in the list on cplusplus.com. Thanks!
If memory serves, it's a non-member function overload -- have a signature something like:
std::istream &operator>>(std::istream &is, std::string &s);
(For the moment I've left out the fact that both istream
and string
are really typedefs of template instantiations).
Do you mean istream& operator>> (istream& is, string& str);
?
(on cplusplus.com)
精彩评论