I have a class cat and i am trying to pass an array of cat obiject to a function as well as valid components of the array.
void show(Cat cats[], int i)
What is incorrect in my line?
I try this way:
...
int new_size=SIZE;
Cat *cats=new Cat[new_size];
.......
void show(Cat cats[], int i)
{.........}
void main
{.... }
and this way
.......
void show(Cat cats[], int i)
{.........}
int new_size=SIZE;
Cat *cats=new Cat[new_size];
void main
{.... }
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.