Hi
Im having trouble with this line of code what I am trying to do is add the counter to # so it works like this
#1, #2, #3 but for some reason the int isn't added to the end?
Im having trouble with this line of code what I am trying to do is add the counter to # so it works like this
#1, #2, #3 but for some reason the int isn't added to the end?
num.insert( counter, "#" + counter );
void CubeData::findXYZPoints1()
{
string num = " -2.996580 -1.823648 2.654824";
unsigned int counter = 0;
cout << "Size of String: " << num.length() << endl;
while( counter < num.length() )
{
if( ' ' == num.at( counter ) )
{
num.erase( counter, 1 );
num.insert( counter, "#" + counter );
counter++;
}
counter++;
}
cout << "Size After insert: " << num.length() << endl;
cout << "Replace:" << num << endl;
}