You can forward declare classes class produto;
That would work if you have pointers or references. (because of how std::vector is implemented, std::vector<preco> would compile with only a forward declaration).
However, if you pretend to create an object or make use of members, then the definition must be available prior to that point.
> NetBeans won't compile it.
¿why didn't you post the error messages?