Re:Why is reading lines from stdin much slower in C++ than P...
by jemfinch on Saturday March 10, 2012 @10:48PM
(#3689480)
Whenever this question is asked, it's almost always std::sync_with_stdio.
[ Parent
| on HN ]
Re:Why is reading lines from stdin much slower in C++ than P...
by 16s on Sunday March 11, 2012 @09:26AM
(#3690315)
Yes, and it's an easy fix as the accepted answer shows:
cin.sync_with_stdio(false);
Re:Why is reading lines from stdin much slower in C++ than P...
by codemac on Sunday March 11, 2012 @06:18AM
(#3690076)
I think it's a larger problem that defaults in standard libraries are rarely understood. For python OR for C++.
I'm asking to the larger Hacker News community here, how do you illustrate the dependencies of a standard library API call without making it more complicated? Syntax is nothing, understanding is everything.