cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
cin.readsome and MinGW
cin.readsome and MinGW
Apr 6, 2013 at 2:59am UTC
vin
(300)
In visual c++ express 2008 cin.readsome reads and stores the number of characters available and returns the number of characters stored.
cin.readsome in MinGW (ZinjaI or Code::Blocks edu portable or the latest Orwell DevC++) always returns 0 (no characters stored).
My searching found articles that said this is a bug in libstdc++ and articles that said that this was an implementation difference.
So does anyone know whether it is a bug or just a different implementation?
Apr 6, 2013 at 6:22am UTC
MiiNiPaa
(8886)
http://en.cppreference.com/w/cpp/io/basic_istream/readsome
The behavior of this function is highly implementation-specific.
[...]
Likewise, a call to
std::cin.readsome()
may return all pending unprocessed console input, or may always return zero and extract no characters.
Topic archived. No new replies allowed.