C++ recursive function for Ackermann