string s("augcuuaucaca");
string temp;
int size = s.size();
int pos = 0;
vector<string> list;
do{
try
{
temp = s.substr(pos, 3);
list.push_back(temp);
pos += 3;
}
catch(out_of_range)
{
break;
}
}while(pos != size);
Clinton Portis
Practically a Posting Shark
833 posts since Oct 2005
Reputation Points: 237
Solved Threads: 118