Home Segments Index Top Previous Next

582: Mainline

Accordingly, C++ allows you to exploit certain input–output mechanisms originally devised for C. In particular, you can call C's printf function.

The general form for printf statements is as follows:

printf (a character string, 
        argument 1, 
        argument 2, 
        ... 
        argument n); 

The character-string argument serves as a pattern into which the other evaluated arguments are inserted.