Please tell how to remove SIGSEGV error from this code

Problem code: ITGUY15

#include<bits/stdc++.h>
#include
using namespace std;
void recur(string s)
{
vector v;
long int i;
int flag=0;
for(i=0;i<s.length();i++)
{
v.push_back(s[i]);
}
vector::iterator it1,it2;
it1=v.begin();
for(i=0;i<v.size();i++)
{
if((v[i]==‘a’)&&(v[i+1]==‘b’)&&(v[i+2]==‘c’))
{
it1+=i;
it2=it1+3;
v.erase(it1,it2);
flag=1;
}
}
if(flag==0)
{
cout<<s<<endl;
return;
}
string str="";
for(i=0;i<v.size();i++)
{
str+=v[i];
}
v.clear();
recur(str);
}
int main()
{
int t;
cin>>t;
while(t–)
{
string s;
cin>>s;
recur(s);
}
return 0;

}