In void add(cluster*)
, the name cluster
resolves to the data member queue::cluser
, not to the class name ::cluster
.
Avoid giving the same name to a type and to a variable. You are only confusing yourself.
solved Cluster is not a type + cluster does not name a type error. Error for add(cluster *). Cant have cluster *?