FAQ 36.09 Which is more extensible: <iostream> or <stdio.h>?<iostream> is more extensible than <stdio.h> since <iostream> allows I/O with user-defined types as well as built-in types. The <stdio.h> functions scanf() and printf() work with a predefined set of types. In contrast, <iostream> allows new, user-defined data types to be written and read using the same syntax used for built-in types (that is, using << and >>). This extensibility is analogous to adding new "%" fields to the switch statement that is used within the implementation of scanf() and printf(). C++ allows user-defined types (class types) to look and act like built-in types. |