The constant needs to be known at compile time, your code is trying to dynamically create an array at run time.
The simplest (but crude) solution is to just give the array a fixed size which is generously large enough.
Alternatives include using new [] and delete []. Or less risky, use a vector instead.
another question, i'm a bit puzzled at what time exactly is the compile time? could you give me a little example? :)
It means after you finish typing your code, you compile it (and maybe get some compiler error messages). Those are compile-time errors.
That is in contrast to run-time, which is what you get after the code has been compiled (turned into an executable program) and you try to run it.