Tuesday, December 28, 2010

wowie

Well, thinking more about global variables made me realize how overkill it was to be passing around my FILE pointer like I was doing. I moved the declaration to outside of main and now each function that needs it can just use it without needing it (or a reference to it) to be passed along.

That makes like... 15 of my hardest lessons in the past few months about passing pointers as function arguments completely unnecessary! They were useful lessons certainly, but it feels weird making my code much simpler and less complex when the complexity is what has gotten me this far.

I wonder if there is any harm in what I'm doing...

No comments:

Post a Comment