Yes, what you wrote is permitted, but you cannot use it like that, you need toinitialize before using that. So in order to initialize that you need to specifyits size. If you want an array which is variable, use Vector class.