Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!ginosko!uunet!lll-winken!arisia!sgi!shinobu!odin!sgi.com!mtoy From: mtoy@sgi.com (Michael Toy) Newsgroups: comp.lang.c++ Subject: C++ 2.0 Question -- Whats wrong with this code ?? Message-ID: <981@odin.SGI.COM> Date: 16 Oct 89 23:37:44 GMT Sender: news@odin.SGI.COM Reply-To: mtoy@sgi.com (Michael Toy) Organization: Silicon Graphics, Entry Systems Division Lines: 19 1 class Base { 2 public: 3 BaseClass(); 4 }; 5 extern TakesOne(BaseClass*&); 6 BaseClass::BaseClass() 7 { 8 BaseClass *equalsThis = this; 9 TakesOne(equalsThis); 10 TakesOne(this); 11 } This causes C++2.0 to tell me "reference to const object" on line 10 Other than the workaround in lines 8&9, how would I write line 10 so that the compiler liked it? Clearly I am missing some simple thing, it seems like this should work. Michael Toy