Re: BigTools [message #66519 is a reply to message #66354] |
Sun, 29 April 2012 00:05 |
|
Just so everyone knows, I have figured out why the file pointer was getting pushed past the string length. "%s" expects to get a series of 'non whitepace characters', not a null terminated string. It seems simple now that I'm thinking about it. Instead of stopping at null, it just kept reading chars from the file until it hit the end of the file and adding them to the string.
Instead I've written my own little method that reads a null terminated string from a file, since I can't find a good one in stdio
Also, I am completely refactoring the program, it should be a bit simpler to follow now, and I don't have everything crammed into one method. I've learned a lot about writing C code in the last few weeks, and I'm applying them now.
"All of the work, and none of the play, will surely provide for a speedy decay"
|
|
|