Re: Smart char * class...
From: Christopher Benson-Manica (ataru_at_nospam.cyberspace.org)
Date: 08/20/04
- Next message: Shea Martin: "design question"
- Previous message: Xenos: "Re: undefined reference to `vtable for ..."
- In reply to: Victor Bazarov: "Re: Smart char * class..."
- Next in thread: Ron Natalie: "Re: Smart char * class..."
- Reply: Ron Natalie: "Re: Smart char * class..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 20 Aug 2004 20:00:37 +0000 (UTC)
Victor Bazarov <v.Abazarov@comacast.net> spoke thus:
> Could you maybe explain why it's not an option?
My boss doesn't like them, and all the code expects char *'s, and none
of it catches std::exception, so...
> No. Passing an object to a function with variable number of arguments
> is undefined. So, printf is not going to work unless you define one
> more member function of 'char_ptr', 'operator const char*':
Ah, that's what I wanted! :)
> Also, your class is defective: it is missing a copy constructor, which
> you have to have according to the "Rule of Three".
That was *also* what I wanted, excellent!
> Keep adding functionality to your class until you get it right. Then
> see which functionality you don't need, and get rid of it.
Will do, thanks!
-- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
- Next message: Shea Martin: "design question"
- Previous message: Xenos: "Re: undefined reference to `vtable for ..."
- In reply to: Victor Bazarov: "Re: Smart char * class..."
- Next in thread: Ron Natalie: "Re: Smart char * class..."
- Reply: Ron Natalie: "Re: Smart char * class..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|