[LC++]Copy constructor etc
Ram
ram123p at yahoo.com
Thu Jul 26 18:09:06 UTC 2001
--- Mark Phillips <mark at austrics.com.au> wrote:
> "John F. Dumas" wrote:
> I am trying to do this with the string class but I
> can't get it working yet. What I have tried is:
>
> class noisyStringTy: public string {
> public:
> noisyStringTy& operator=(noisyStringTy const& ns)
> {
> return string::operator=(ns);
> cout<<"operator="<<endl;
> }
> noisyStringTy(): string() { cout <<
> "noisyStringTy()" << endl; }
> noisyStringTy(char const* cStr): string(cStr) {
> cout<<"noisyStringTy(char const* cStr)"<<endl;
> }
> };
>
I am not sure if we can call a operator = directly as
above ? I also got the compilation errors.Does anyone
know how to do the above ?
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
More information about the tuxCPProgramming
mailing list