action controller c++ code