I want to replace all -99999 in a line with just spaces.
I've got it working with the following code....but is there a more elegant way of doing it?
Code:
string entireLine = name+strID+strCP+strX1+strX2+strX3+strCD+strPS+strSEID;
string::size_type idx = 0;
while (true)
{
idx = entireLine.find("-99999", idx);
if (idx == string::npos)
break;
entireLine.replace(idx, 6," ");
idx += 6;
}
