#9101: C++ CE help !!!


zihyouliao (zihyou)


第 1 測資點(0%): CE () 
編譯錯誤
/code_1937968.cpp: In function ‘int main()’: /code_1937968.cpp:10:19: error: ‘std::string’ has no member named ‘pop_back’
 
#include <iostream> #include <string> using namespace std;  int main(){     string s;          while (cin >> s) {         for (int i= s.size()-1; i>=0; i--) {             if (s[i] == '0') {                 s.pop_back();             }             else                 break;         }                  for (int i= s.size()-1; i>=0; i--) {             cout << s[i];         }                  cout << endl;     } } 
why? has no member named ?