Quote:
Originally Posted by Quagmire
seperator->argplus[0] should be what you're looking for. It stores a pointer to the original string (so be careful to check if that's been de-allocated).
|
Thanks for pointing that out. In the interem between my post and yours, a msg member has been added to the code that does what I need w/o the subtle danger of memory corruption that you warn of. Since seperators are useful, I could easily see getting into trouble with "Seperator foo("bar");", so I fully support changing them to operate on a local copy of the string. Reviewing the code, though, I see that the argplus array needs to be set to point to the msg member to reflect the change. Also, for some reason the code to free the mem is commented out. Worth looking into.