Here’s a line of code that I get an error about, which is in my book from 2008: std::cin.get(std::cin.rdbuff()->in_avail()+1);
Could someone please tell me what it means and why it gives me an error:
In function 'int main()':|7|error: 'struct std::istream' has no member named 'rdbuff'|
||=== Build finished: 1 errors, 0 warnings ===|
–update–
changed rdbuff to rdbuf, and it throws this error:
walkthrough.cpp|7|error: no matching function for call to 'std::basic_istream<char, std::char_traits<char> >::get(std::streamsize)'|
The member function is called
rdbuf(), onef, as a cursory glance at any library reference will easily reveal.In other words, the error is that
istreamhas no member namedrdbuff.