Time:01-13
CodePudding user response:
using the C + + fstream, you this is C API
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);
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
Page link:https//www.codepudding.com/Backend/98343.html