/*
*Copyright (c) 2016,烟台大学计算机学院
*All rights reserved.
*文件名称 :第16周程序阅读(8)
*作 者 : 于子娴
*完成日期 : 2016.6.23
*版 本 号 : v6.0
*
*问题描述 :
*输入描述 :
*程序输出 :
*/
#include<iostream>
#include<fstream>
using namespace std;
const char * filename ="a.txt";
int main()
{
long pos;
ofstream outfile;
outfile.open("test.txt");
outfile.write("This is an apple",16);
pos=outfile.tellp();
outfile.seekp(pos-7);
outfile.write(" sam",4);
outfile.close();
return 0;
}