Stupid C++ Tricks: A better sizeof_array()

January 23, 2011

The tried-and-true C way to determine the length of an array is this: #define sizeof_array(x) (sizeof(x) / sizeof(x[0])) As H. L. Mencken put it, “there is always a well-known solution to every human problem — neat, plausible, and wrong.” That is certainly the case with this approach. It’s short, to the point, very easy to […]

6

hax0red

January 17, 2011

A few months ago, I noticed that cnicholson.net was serving a blank page, and that Google Chrome was warning me of malware. I sent an email to Dreamhost asking if things were ok, and they responded with a link to their Troubleshooting Hacked Sites wiki page. Uh oh. I let the site languish because work […]

2