Main.cc: In function 'void fun(int, int, int)': Main.cc:31:58: error: 'reverse' was not declared in this scope if(p3==2) reverse(temp_s.begin(),temp_s.end()); ^