- 6
- 0
- 约1.15万字
- 约 42页
- 2017-02-04 发布于北京
- 举报
第十七章c文件处理
0 1 2 3 4 5 n-1 文件指针 10.5.1 文件和流 ios::beg ios::cur ios::end 二进制文件的顺序读写 流的状态表示:流的内容、长度和操作位置 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. ostream 类中两个操作字节数据的成员函数 ostream ostream :: put ( char c ) ; ostream ostream :: write ( char * buf , int n ) ; 向流插入 buf 对象的由第二个参数指定数目的字节数据 ofstream outf( test.dat , ios::out | ios::binary ) ; char str[10] = “Hello!”; outf.write( str , 10 ) ; int a[10] ={1,2,3,4,5}; for(int i = 0; i 10 ; i ++ )
原创力文档

文档评论(0)