A basic function solver in C++.