Access the AI MoveTo function but with C++

How do you Implement Success and failure?