Daniel Fone wrote:

(snip)

I wrote a more detailed reply but most of my points have been covered by 
others.  I think all thats left is that you should fclose() your file 
after you've finished reading it.

>                 printf("Quote file not found!");

Just a silly nitpick; its a good idea to append "\n" to the end of the 
string.  This prints a newline so you don't end up getting all your 
output on the same line :)

However in situations such as this I tend to prefer puts(), which 
automatically appends a newline.  Thats just a personal preference (I 
only use printf() if I have to).

>         char * sQuote;

I declare all my local variables at the start of the function (ie where 
you declare 'myfile').  Its easier to keep track of them.

Cheers,

- Dave

http://www.digistar.com/~dmann/


Reply via email to