文件名称:Dog
- 所属分类:
- 控制台(字符窗口)编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 5kb
- 下载次数:
- 1次
- 提 供 者:
- se***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
/*11-6. 声明一个dog类,包含体重合年龄两个成员变量及相应的成员函数,声明一个实例dog1,体重为5,年龄为10,
使用I/O流把dog1的状态写入磁盘文件,再声明另一个实例dog2,通过读文件把dog1的状态赋给dog2。分别使用文本方
式和二进制方式操作文件,看看有何不同;再看看磁盘文件的ASCII码有何不同。*/-/* 11-6. Declare a dog class that contains two member variables age, weight and co-corresponding member function, declare an instance dog1, weight 5, age 10, using the I/O streams to write to the disk state dog1 file, and then declare another instance dog2, by reading the status file to dog1 assigned dog2. Respectively, using text files and binary mode operation, see what different look at the disk file in ASCII codes differ.* /
使用I/O流把dog1的状态写入磁盘文件,再声明另一个实例dog2,通过读文件把dog1的状态赋给dog2。分别使用文本方
式和二进制方式操作文件,看看有何不同;再看看磁盘文件的ASCII码有何不同。*/-/* 11-6. Declare a dog class that contains two member variables age, weight and co-corresponding member function, declare an instance dog1, weight 5, age 10, using the I/O streams to write to the disk state dog1 file, and then declare another instance dog2, by reading the status file to dog1 assigned dog2. Respectively, using text files and binary mode operation, see what different look at the disk file in ASCII codes differ.* /
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Text2.cpp
Text2.dsp
Text2.dsw
Text2.ncb
Text2.opt
Text2.plg
dog1.txt
dog2.txt
Text2.dsp
Text2.dsw
Text2.ncb
Text2.opt
Text2.plg
dog1.txt
dog2.txt