Raised This Month: $ Target: $400
 0% 

Help write file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-10-2007 , 14:22   Re: Help write file
Reply With Quote #1

After
Code:
fprintf(fileh, "%s", text);
you will probably want to add
Code:
fputc(fileh, '^n'); // ^n is the newline character
This way, the next time you write to the file, it will be on the next line down, instead of added to the last line.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-10-2007 , 16:07   Re: Help write file
Reply With Quote #2

Code:
fprintf(fileh, "%s^n", text);
Easier.

Is it better to use fputc()?
[ --<-@ ] Black Rose is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode