I wasn't posting a new topic it was a reply to the above problem. he had a word in this case the name of a variable and he wanted to replace all instances of it in his string even though he set the value before he set the value of the the replacement string. I said that he should try regular expressions and cout the result. I'm sorry if I was somehow unclear.