Contents Up << >>

Why should I use <iostream.h> instead of the traditional <stdio.h>?

Increase type safety, reduce errors, improve performance, allow extensibility, and provide subclassability.

Printf is arguably not broken, and scanf is perhaps livable despite being error prone, however both are limited with respect to what C++ I/O can do. C++ I/O (using "<<" and ">>") is, relative to C (using " printf()" and "scanf()"):