On Sat, Feb 17, 2007 at 12:22:13AM -0500, Thomas Hruska wrote:

> >> The function also has the bug of not doing anything useful even if it
> >> did work.  Best bet is that it was supposed to concatenate two strings.
> >>
> >> I'd prefer the Safe C++ method of doing string concatenation:
> > 
> > But if they were using C++, they could have used std::string instead
> > of C's string manipulation functions....
> 
> Sure they could, but I prefer BString - way too many limitations in 
> std::string.

Are there limitations with string concat with std::string?

> >> printf("%s\n", *str);
> > 
> > Is printf() part of Safe C++? ;)
> 
> I don't like cout - it is ugly to look at.  Personal preference, 
> laziness, and history defers to printf() for lack of anything better 
> (IMO).

Safer is better, and cout is certainly a lot safer than printf(),
especially when you can casually do daft things such as:

  int i = 42;
  printf("%s\n", *str, i);

Regards
Andrew

Reply via email to