journal
all ![]() | Rob is 20,118 days old today. |
Entries this day: C-review C review 3:19am JST Thursday 18 November 2010 (day 14848) Though the overall code is shocking, I've been working for a ouple days on refreshing my C brain. Just getting back into the grammar and functions and pointers and stuff. I created a little thing that plays wth command line args, and then created a cute semi-functional command line thing to talk to MySQL. I wanted to review reading and writing files, so for each MySL query, I'm actually creating the query, saving it to a file, loading it from the file before executing it. Also recording each set of command line args in a log file. I've got a terrible solution for how to return a char * from a function. I'm actually returning the value of strcat(destination,final_bit) at the end of the function that creates the string. I'm sure there's got to be a better way. In one case, I don't even have anything in final bit. Just an empty string. Oh wait; nevermind. That particular bit of code isn't used anymore, so I've removed it. permalink |