- #1
Tom McCurdy
- 1,020
- 1
I am having trouble with this in C++
Its supose to replace any thing in string body.Copy between < > with periods but leave everything else alone
currently it changes everything in body.Copy to periods
any idea why??
Code:
while(k < bodyCopy.size())
{
bodyCopy[k] = tolower(bodyCopy[k]);
please=bodyCopy[k];
cout<<please<<endl;
if (please='<')
{
inTag=1;
}
if (inTag==1)
{
please='.';
bodyCopy[k]=please;
}
if (please=='>')
{
inTag=0;
}
k = k + 1;
}
currently it changes everything in body.Copy to periods
any idea why??