> strdup isn't standard, so it's impossible to say for sure, but every
version of it I've seen has used malloc.
Having said that, I feel obliged to question using strdup in C++ at all.
Use std::string, and it handles these sorts of things automatically.
Being completely self taught in C++ from quite some time ago I never got
around to using or learning templates, and still use my own list
functions and all that where I probably should be using templates.
The main reason why I was asking is that I have my own function that I
use a bit called strnew which performs the exact same function as strdup
and I was trying to find out if it was really necessary to have my own
function or if I could get away using strdup.
Thanks for the information.
Woodster