Just forget about the idea about '\0'.

The easiest way is to a) use a vector if you don't know how large the array must be, and b) rely on the knowledge that if input fails (mostly because of...