What’s Wrong With This Code?


I meant to include this in my post about Building a DNS Resolver, as it is a small, yet significant bug that took me a little while to find. What the code should be doing, is reading a string from a file (where all strings in the file are guaranteed to be 255 characters or less), then pushing that string into a Queue. So before you jump to the whole article, can you see what’s wrong with the code?

Continue reading “What’s Wrong With This Code?”

ASCII Hangman

Back in late 2007 I was fresh out of my freshman year of a computer science degree, and thought I knew C++ well enough to build another game. The “Haunted House” game took forever to build and was full of bugs at first, but that was a full semester of classes ago. Now I was ready to make another game, also I was bored and wanted to stay sharp, so I built an ASCII-art Hangman game.

(Update June 2013: The original source code is now available on GitHub! Feel free to download and play with it!)

Continue reading “ASCII Hangman”