CFile myfile;
myfile.open("filename",CFile:ModeWrite)这种方式把我以前写过的东西覆盖了
我想在他后面添加应该怎么办。
多谢多谢
myfile.open("filename",CFile:ModeWrite)这种方式把我以前写过的东西覆盖了
我想在他后面添加应该怎么办。
多谢多谢
解决方案 »
- 40分求助:ActiveX控件的问题
- 【请高手指点】给MDI视图类(派生于CScrollView)添加工具栏,怎么显示不出来~~
- 菜鸟问题,请高手指点
- CHeaderCtrl绘制排序图标不理想,帮看看
- 如何让TREEVIEW打开的接点显示开的图标?
- VC Excel 类Workbook的Saveas方法无效
- vc++ 获取函数中局部变量名
- 请问如何用 CombineRgn()这个API函数抠区控件中的bmp白色部分。
- 请教acmStreamOpen的用法.
- 怎样在视图中用鼠标拖动来任意移动Bitmap和Icon呢?谢谢高手指引。希望附代码。
- CString,std::string,char*之间应该如何转换?
- 请问:如何在其它类中修改文档类中的成员变量?
char timeREF[80];
strcpy(timeREF,"Hello World!"); if((stream = fopen( "c:\\pts.txt", "a+" ))!= NULL)
{
fputs( timeREF, stream );//写一行
fclose( stream );
}
myfile.Open("c:\\1.txt",CFile::modeWrite );
myfile.SeekToEnd();
myfile.Write("aaaa",4);
myfile.Close();
if(a.Open("f:\\aa\\qaz.txt",CFile::modeReadWrite
|CFile::typeText)==NULL)
{
MessageBox("读写文件失败","提示",MB_OK+MB_ICONWARNING);
return;
}
CString my="example";
a.SeekToEnd();
a.WriteString(my);
a.Close();
myfile.Open("c:\\1.dat",CFile::modeWrite );
myfile.SeekToEnd();
myfile.Write("abcd",4);
myfile.Close();