I need to perform Circular Right Shift in my program and I am doing it the following way :-
int a = 425;
int q = a / 10;
int r = a % 10;
string t = to_string(q);
string s = to_string(r);
int newnum = stoi(s+t);
cout<<newnum<<endl;
It is working on my terminal after I include -std=c++11 flag but when i tried it in Code::Blocks it wasn't working so i checked this Settings -> Compiler ->"Have g++ follow the C++11 ISO C++ language standard [-std=c++11]" but it is still giving me the error "to_string was not declared in this scope".
Aucun commentaire:
Enregistrer un commentaire