iostream
来源:互联网 发布:2017日本就业率数据 编辑:程序博客网 时间:2024/05/01 20:00
#include<stdio.h>class MyOutStream{public: const MyOutStream & operator <<(int value) const; const MyOutStream & operator <<(char *value) const;};const MyOutStream &MyOutStream::operator <<(int value) const{ printf("%d",value); return *this;}const MyOutStream &MyOutStream::operator <<(char *value) const{ printf("%s",value); return *this;}MyOutStream myout;int main (){ int a=2008; char *str="hello world"; myout<<str<<"\n"; myout<<a; return 0;}
自己编写stream类看看cout 不是函数而是对象
- iostream
- iostream
- IOStream
- iostream
- IOStream
- iostream
- IoStream
- iostream
- iostream
- iostream.h 与 iostream
- iostream.h vs iostream
- iostream与iostream.h
- <iostream>和<iostream.h>
- iostream & iostream.h
- iostream 和 iostream.h
- iostream,iostream.h差异
- <iostream>和<iostream.h>
- iostream.h , iostream
- C语言的两个工具函数
- 归一化RGB图像
- 企鹅快跑——腾讯敏捷历程揭秘
- 算法导论 逆序对问题
- uboot 移植之gd_t,bd_t
- iostream
- 请问Eclipse中源码的中文部分都显示成乱码如何解决 .
- get out & clean
- 微博上对乔布斯的评价
- Hibernate一对一,一对多懒加载的要求
- 编写高质量C语言代码--assert yourself
- WindowsPhone程序运行时屏幕常亮
- 关于addEventListener和attachEvent的初步探讨
- Qt中可以把一个复杂对话框分为几部分的组件类