BW> strcpy( psz, "Should I Do This???" );
BW> delete[] psz;
BW> return psz;
TT> No, definitely not!
OK, that's three for three against, and I think I knew it was wrong
anyway. What about a solution? Would a global char * be the best way?
char *psz=0;
char *FuncToGetSomeString( int len )
{
delete[] psz;
char *psz = new char[len];
strcpy(psz, "What do you think?");
return psz;
}
L8r,
bw
... Now is the time for senseless bickering!
--- Blue Wave/DOS v2.20
---------------
* Origin: River Canyon Rd. BBS Chattanooga, Tn (1:362/627)
|