Using iostream
should not make your program crash. It can be slow, but that's only because it's trying to interoperate with stdio
. That synchronization can be turned off1. iostream
is the idiomatic C++ way to get input, and I'd recommend its use over stdio
functions in most cases when using C++.
1 using std::ios::sync_with_stdio(false);