Vincent Gable’s Blog

October 19, 2009

sizeof() Style

Filed under: Bug Bite,C++,Objective-C,Programming,Tips | , ,
― Vincent Gable on October 19, 2009

Never say sizeof(sometype) when you can say sizeof(a_variable). The latter works even if the type of a_variable changes, and it is much more obvious what the size is supposed to represent.

Powered by WordPress