- Jan 28, 2005
- 144
- 0
- 0
SO ive received some old hand me down code that i want to use, but I've avoided C++ for awhile now and have no idea how to do what i want to do
First off i have a union, and i want to pass this union a ptr to a string. But i need to edit this string before i can send it over, and im using the string.h header.
Say the string var contains "stuff"
I want to remove the qoutes
So i was thinking taking var+1 and storing that into another var
so var2 = var+1 = stuff"
But then how to i replace the second " with a end line char?
Then i need to pass a ptr to the newly edited string to the union
Also im a little lost with the whole passing a ptr/memory allocation deal with c++ strings.
First off i have a union, and i want to pass this union a ptr to a string. But i need to edit this string before i can send it over, and im using the string.h header.
Say the string var contains "stuff"
I want to remove the qoutes
So i was thinking taking var+1 and storing that into another var
so var2 = var+1 = stuff"
But then how to i replace the second " with a end line char?
Then i need to pass a ptr to the newly edited string to the union
Also im a little lost with the whole passing a ptr/memory allocation deal with c++ strings.
