'task' is not declared in this scope.

Thank you so much guys, the program works now

I really should charge for my psychic work.