This preview shows page 1. Sign up to view the full content.
Unformatted text preview: which is even more likely to work, with the extra argument ignored. This problem is intrinsic to printf() and related functions. Using stream I/O as illustrated above eliminates this particular problem completely: cout << a << " " << b << " " << c << "\n"; as well as the related problem illustrated by: int a; printf("%s\n", a); where the argument is of the wrong type. Stream I/O is fundamentally safer than C-style I/O; stream I/O is said to be "type safe"....
View Full Document
This note was uploaded on 02/27/2012 for the course CS 251 taught by Professor Staff during the Fall '08 term at Purdue University.
- Fall '08