From: "Florian X" Newsgroups: comp.os.msdos.djgpp Subject: File Date: Tue, 22 Feb 2000 16:31:32 +0100 X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Lines: 18 Message-ID: <38b2ab5f$0$83570@SSP1NO17.highway.telekom.at> NNTP-Posting-Host: 212.183.86.36 X-Trace: newsreader.vienna.highway.telekom.at 951233375 83570 212.183.86.36 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi! I use this in my program: char *string= "Hello world"; FILE * f = fopen("file.txt", "a"); fprintf(f, "%-128s", string); // ftell(f); fclose(f); But it doesn't write the text to the file, if i use ftell(...) after fopen(...), ftell(...) returns -1 (error); ftell