19.10.2010, 21:52
Again your missing case 1. And random(3) will give 4 cases not 3 (cases 0, 1, 2, 3). If he is comfortable using sscanf there is no problem using that for null checks its not exactly insanely inefficient. Nor is it slow.