Home > Back-end >  How to add in the file group c before the original data does not cover add data?
How to add in the file group c before the original data does not cover add data?

Time:01-13

It took me a + files, but after the operation or only showed now add data

CodePudding user response:

Using C + + fstream, you this is a C API

CodePudding user response:

reference 1st floor Italink response:
using the C + + fstream, you this is C API

Do not understand, can say in detail

CodePudding user response:

 FILE * fp1; 
Fp1=fopen (" C:/Users/yf/Documents/Visual Studio 2010/Projects/ReadTime/ReadTime/ReadTime XLS ", "a +");//fp pointer to file header
Fseek (fp1, 0, SEEK_END);
If (fp1==NULL)
{
Printf (" open failure \ n ");
System (" PAUSE ");
}
System (" PAUSE ");

Int aa=1000;
Char STR [20].
Char * str11="\ t \ n";
The fputs (str11 fp1);
Char * str1="\ n \ t";
The fputs (str1 fp1);
Itoa (aa, STR, 10);
The fputs (STR, fp1);
Printf (" open success \ n ");

The fclose (fp1);


Before the test continue to write data code, it's helpful for you to see if it

CodePudding user response:

The
reference 3 floor of dye dust response:
 FILE * fp1; 
Fp1=fopen (" C:/Users/yf/Documents/Visual Studio 2010/Projects/ReadTime/ReadTime/ReadTime XLS ", "a +");//fp pointer to file header
Fseek (fp1, 0, SEEK_END);
If (fp1==NULL)
{
Printf (" open failure \ n ");
System (" PAUSE ");
}
System (" PAUSE ");

Int aa=1000;
Char STR [20].
Char * str11="\ t \ n";
The fputs (str11 fp1);
Char * str1="\ n \ t";
The fputs (str1 fp1);
Itoa (aa, STR, 10);
The fputs (STR, fp1);
Printf (" open success \ n ");

The fclose (fp1);


Before testing continues to write data code, it's helpful for you to see if it

I have to solve. Thanks
  • Related