I want to implement object array with variable.im getting error "expression must be a constant value"

11 Views Asked by At
Int size;  //size is variable
cout<<"enter size";
cin>>size;
Inventory p[size];
/*Inventory is a class.p is an 
 object of inventory class.*/

I want to implement array object with size variable but I'm getting error "expression mush have a constant value"

0

There are 0 best solutions below