Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在不使用 operator>>() 的情况下从 istream 中提取数据(内容)?
如果要从 istream 中读取字符,请使用 get 和 getline:
std::istream::get
std::istream::getline
对于一般阅读,您可能需要使用 read:
std::istream::read