TOJ1420

 1 #include<iostream>
 2 #include<string>
 3 using namespace std;
 4 int main()
 5 {
 6     string s;
 7     int N;
 8     int i;
 9     while (cin >> N)
10     {
11         while (N--)
12         {
13             cin >> s;
14             cout << "6";
15             for (i = 6;i < s.length();++i)
16             {
17                 cout << s[i];
18             }
19             cout << endl;
20         }
21     }
22     return 0;
23 }
View Code

编辑器提示你——请使用"&"来创建指向成员的指针——即调用函数时要加上()

eg:

string s;
for(int i=0;i<s.length();++i)
{
  /*……*/
}

  

原文地址:https://www.cnblogs.com/hansichen/p/7152032.html