Appending text file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Appending text file

527 Views
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 Kudos
Reply
0 Replies