Apart from things already mentioned (not using statics, using standard algorithms, avoiding magic values) I also wouldn't even use an array. I would employ one of the standard containers. I'd...