C++输入输出流对象

C++输入输出流对象:

1.输入输出流对象  类-----类类型

  整型  变量名

   int      age;

  字符串 对象名   对象的本质(变量 和数据)

  string name;

  ostream cout;    //运算符是一种特殊的函数

  cout<<12<<endl;

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

  endl 和 “\n”的区别:

     endl可以换行并刷新缓存

猜你喜欢

转载自www.cnblogs.com/xuelanga000/p/11626720.html