编辑代码

#include <iostream>
using namespace std;
int main() {
    string myStr = "hello";
    auto it = myStr.begin();
    cout << it - myStr.end() << endl;


    while (it != myStr.end()) {
        cout << it - myStr.end() << ' ';
        cout << *it << endl;
        it++;
    }
	return 0;
}