Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The almighty cin has it disadvantages when it comes down to performance. That's why I will always prefer scanf/gets, for a rather simple I/O performance boost.


Using gets() also makes writing exploits much quicker - win-win! ;-)

Sorry, I couldn't resist - you are of course right with the general stdio over std::iostream thing, though. I've also found that memory usage and executable size explode when using streams - though that's not C++'s fault per se, more a stdlib/compiler problem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: