DrBob wrote:
Using gcc 3.3 on MAC OS X.
i have a variable called:
string x;
I need to copy the string using memcpy so how do I get the pointer to
the data and its length in bytes?
Getting the string: x.c_str();
Getting the length in bytes: (x.length() + 1) * sizeof(string::value_type)
Remove the +1 bit if you don't need the terminating NULL-character.
--
Unforgiven
"You can't rightfully be a scientist if you mind people thinking
you're a fool."