第十六周阅读程序-6
来源:互联网 发布:美元霸主地位知乎 编辑:程序博客网 时间:2024/05/22 05:15
/*copyright(c)2016.烟台大学计算机学院 * All rights reserved, * 文件名称:text.Cpp * 作者:刘涛 * 完成日期:2016年6月10日 * 版本号:vc++6.0 * 问题描述:阅读程序 */#include <iostream>#include <fstream>using namespace std;int main( ){ unsigned char a[] = {0xD4,0xB8,0xB7,0xAD,0xD7,0xAA,0xB5,0xC4,0x43,0x2B, 0x2B,0xBF,0xCE,0xCC,0xC3,0xCE,0xAA,0xC4,0xE3,0xB4, 0xF8,0xC0,0xB4,0xD1,0xA7,0xCF,0xB0,0xB7,0xBD,0xB7, 0xA8,0xB5,0xC4,0xB8,0xC4,0xB1,0xE4,0xA3,0xA1 }; ofstream outfile("f3.dat",ios::out|ios::binary); outfile.write((char*)a, sizeof(a)); outfile.close(); return 0;}
运行结果:
这是个二进制文件,把a写进输出流中,在记事本中打开的时候转为了它本来的意思。
0 0
- 第十六周阅读程序-6
- 第十六周程序阅读(6)
- 第十六周 阅读程序
- 第十六周阅读程序
- 第十六周阅读程序
- 第十六周 阅读程序
- 第十六周 程序阅读
- 第十六周 程序阅读
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周 阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- Android 面试精华题目总结
- Docker Blog List
- 运输问题(最小费用流)
- 《剑指offer》:[32]从1到n整数中1出现的次数
- hdu 5317 RGCDQ(dp)
- 第十六周阅读程序-6
- Java override与overload
- Qt中添加背景图片
- 大数据知识(1)--zookeeper原理
- Sizeof取的长度小于负数?
- 单例模式
- Zookeeper02 - Zookeeper的数据模型
- LaTeX命令速查手册1
- 20条正则表达式