Please correct the code

#include
#include
#include
#include
using namespace std;
vector ans;

void replacePI(string ques, int i, int n)
{

// base case
if (ques[i] == '\0' || ques[i + 1] == '\0')
{
    ans.push_back(ques);
    return;
}

// recurance Relation
if (ques[i] == 'p' && ques[i + 1] == 'i')
{
    int j = i + 2;
    while (j != '\0')
    {
        j++;
    }
    while (j >= i + 2)
    {
        ques[j + 2] = ques[j];
        j--;
    }
    ques[i] = '3';
    ques[i + 1] = '.';
    ques[i + 2] = '1';
    ques[i + 3] = '4';
    replacePI(ques, i + 4, n);
}
else
{
    replacePI(ques, i + 1, n);
}

}

void print(vector a, int n)
{
for (string x : a)
{
cout << x << endl;
}
}
int main()
{
int n;
cin >> n;
vector ques;
for (int i = 0; i < n; i++)
{
string input;
cin >> input;
ques.push_back(input);
}

for (int i = 0; i < n; i++)
{

    replacePI(ques[i], 0, ques[i].length());
}
for (string x : ans)
{
    cout << x << endl;
}
return 0;

}

hi @nitinchauhan0808_be04315530401452 refer

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.