Appending text file

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Appending text file

575件の閲覧回数
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 返答(返信)