C++ AI Patrol between 2 target points and chase player when near

Hi guys, can someone help me with AI patrolling between 2 target points using c++?

Wrong Place, go to c++ programming page, not community content