<<< Using C++ Objects | Index | Standard Output Stream, Cont. >>> |
typename object name ------------ ----------- std::ostream std::cout; // cout is a predefined object
Usage example:
#include <iostream> // C++ standard library header
using std::cout; // cout declared inside std namespace
int main()
{
int x = 65;
cout << x; // display value of number 65
cout.put( x ); // display character 'A'
return 0;
}
/* This program prints:
65A
*/
<<< Using C++ Objects | Index | Standard Output Stream, Cont. >>> |