Archive for August, 2008
I ran into a strange bug this week in the code to the C project I’ve been working on. Seemingly randomly, I was encountering a segfault in a call to malloc() while allocating memory for a new struct. The problem had me completely baffled, and web searches turned up no useful information, since most people [ READ MORE ]
Although C is regarded primarily as a procedural language, it is entirely possible to write C code structured in a way similar to code written in object-oriented languages such as C++. Now, of course, you could go all out and write truely object-oriented C, complete with inheritance, type checking, and the like. But that’s not what [ READ MORE ]