Hi everyone
I'll be grateful, if someone can help me.
Is there any way to cast a non-const variable to const one?
I want to read variable n from file and then use it to declare array "int arr[n]", but because n is non-const, the compiler doesn't allow me to do that.
> I want to read variable n from file and then use it to declare array "int arr[n]",
> but because n is non-const, the compiler doesn't allow me to do that.
to TheIdeasMan:
Thanks a lot...
but i think, when there is no need for dynamic memory allocation, working with array is much quicker than vector and so on...