[Solved] C++field of struct if error


restavracija is a type, not an object. You have to instantiate it to produce an object.

In this particular case, it looks like you’re expecting an array of them, and you want to call that array polje. Such an array declaration will look something like:

restavracija polje[10];

Accessing element i in that array will then look like:

polje[i]

2

solved C++field of struct if error