Subj : Re: string comparison To : borland.public.cpp.borlandcpp From : "Ed Mulroy [TeamB]" Date : Tue Nov 25 2003 12:25 pm I used to do that also. However the new C++ Language spec from 1998 doesn't provide for that to work. If using a newer compiler (newer than Borland C++ 5.02 or Turbo C++) be prepared to handle an exception if the allocation fails. .. Ed > Sebastian Ledesma wrote in message > news:3fc36d30@newsgroups.borland.com... > > I will prefer: > newstring = new char[strlen(passed)+1]; > > Also, sometimes i prefer to use: > set_new_handler(0); > this ensures that a fail in the allocation didnt throw a > exception, instead it returns NULL (as lot of code expect). .