I dont know why i keep getting these errors
error: expected primary-expression before ‘*’ token
if (i==employee*->x())
^
error: expected primary-expression before ‘->’ token
if (i==employee*->x())
^
Could you post your employee class definition? Apparently it doesn't define an x() method. Posting this may also help with resolving the problems in your other threads as well ( no employee(double, double) constructor ).