help me please

Don't know if this is exactly what you mean:

include <string>
#include <string>
#include <iostream>

using namespace std;

void reverseStringWithLoop(string & str)
{
    size_t len = str.length();
    for (size_t i = 0; i < len / 2; ++i)
    {
        size_t j = len - i - 1;
        swap(str[i], str[j]);
    }
}

int main()
{
    string str("12"); // works with arbitrary string length
    reverseStringWithLoop(str); // same as std::reverse(str.begin(), str.end());
    cout << str;
    return 0;
}