void Move(struct Rabbit *rabbit) { for (int i = 0; i < 20; i++) { coord1.X = rabbit[i].X; coord1.Y = rabbit[i].Y; SetConsoleCursorPosition(handle, coord1); cout << " "; } } 

In rows

  coord1.X = rabbit[i].X; coord1.Y = rabbit[i].Y; 

displays an error:

the expression must represent a pointer to the full type of the object

  • coord1.X = rabbit [i] .X; coord1.Y = rabbit [i] .Y; here it displays the error "the expression must represent a pointer to the full type of the object - Maxim Old

1 answer 1

It seems that before this code you do not have a full declaration of type Rabbit - and the compiler before the function Move met only something like

 struct Rabbit; 

Those. he knows that this type is there, but he does not know what is inside him, but at the moment it is already important.

Modify the code so that the complete Rabbit declaration is available to the compiler at this point.