C++ program that solves any maze