add c++ mode setting