I wanted to make a program that assign a string to another string on reverse without using any builtin functions but i got this error,how can i solve it. image
#include <iostream>
using namespace std;
int main()
{
string a, b;
cin >> a;
for (int i = 0; i < a.size(); i++)
{
b[i] = a[a.size() - 1 - i];
}
cout << b;
}