正在加载图片...
第9章流类库与输入/输出 H 2.原理 cout是 ostream类的全局对象,它在头文件 iostream. h中的定义如下: ostream cout( stdout);∥这里, stdout作为该对象构 造时的参数对应每种基本数据类型, ostream类都存在 友元,它们都在 iostream. h中声明。例如: ostream& operator<<(int n ostream& operator<<(float f) ostream& operator<<(const char psz)第9章 流类库与输入/输出 2.原理 cout 是 ostream 类 的 全 局 对 象 , 它 在 头 文 件 iostream.h中的定义如下: ostream cout(stdout); //这里,stdout作为该对象构 造时的参数对应每种基本数据类型,ostream类都存在 友元,它们都在iostream.h中声明。例如: ostream& operator<<(int n); ostream& operator<<(float f); ostream& operator<<(const char*psz); //
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有