C ++ objects input and output streams

C ++ objects input and output streams:

1. The input and output stream class object class type -----

  Integer variable name

   int      age;

  Nature (and variable data) string object name of the object

  string name;

  ostream cout; // operator is a special function

  cout<<12<<endl;

  cout.operator<<(12).operator<<endl;

  endl and "\ n" difference:

     endl and flush the cache can wrap

 

Guess you like

Origin www.cnblogs.com/xuelanga000/p/11626720.html