Appending text file

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Appending text file

557 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rithus on Sat Mar 15 04:53:28 MST 2014
Hi,

I am new to LPCXpresso. I wonder if i can append a text file on the pc drive using the usual c code?

This is my text below however is doesn't seem to be able to append any text file and when i run the program, i notice that the program will be stuck in the fopen append function. However it is working perfectly fine when i use the read and write function. May i ask if there is any other way to append a .txt file?

This is my code:

FILE * pFile;

pFile = fopen ("C:\\LPCDATA.txt","a");
fputs ("hello",pFile);
    fclose (pFile);

Thanks in advance:)
0 项奖励
回复
0 回复数