use the following command to compile: g++ -g -std=c++0x recursion.cpp -o recursion