Page 1 of 1

Help needed with files (solved)

PostPosted: Thu Aug 04, 2011 1:24 pm
by lcl
Can someone please help me to clear a text file which is created by GE.
I am making an internet bookmark application which stores bookmarks into file
with their web address and name, and then loads them from it.
I just want to add ability to remove bookmarks, and that's why I need to get the file
cleared and then write the bookmarks again.

So, does anyone know a way to clear a file? :D

Re: Help needed with files

PostPosted: Thu Aug 04, 2011 5:58 pm
by Game A Gogo
when using fopen, instead of having the "r+b" parameter, have "w+b", it will create a new file to write to, it may be possible that you do not have the +b

Re: Help needed with files

PostPosted: Thu Aug 04, 2011 5:59 pm
by lcl
Thanks, GAG, got to try that :D

EDIT:
Thank you so much, that worked perfectly!
I had struggled with that problem for hours! :lol:
+1 to you!