Ok so i am trying to create an array in my class but i dont want to specify the size as it changes from object to object what i have is this:
Code:
class parklot{
private:
char lotname;
int size, numcars;
log currlog[50], permlog[200]; //error here
public:
//Constructor
parklot(char='Z',int=0,int=0,log=log(),log=log());//default
parklot(const parklot &a_parklot);//copy
.......};
but i get two errors related to that piece of code, these are:
- error C2327: 'parklot::size' : is not a type name, static, or enumerator
- error C2065: 'size' : undeclared identifier
can anyone tell me why? is this even possible to begin with?