www.delorie.com/archives/browse.cgi | search |
From: | manni DOT heumann AT gmx DOT de (Manni Heumann) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: class as argument of method of class ??? |
Date: | 12 Mar 2001 17:04:59 GMT |
Lines: | 25 |
Message-ID: | <Xns9062B83DF238Emanniheumanngmxde@130.133.1.4> |
References: | <3AA25734 DOT 72FA5B67 AT t-online DOT de> |
NNTP-Posting-Host: | pec-149-147.tnt6.h2.uunet.de (149.225.149.147) |
X-Trace: | fu-berlin.de 984416699 2373386 149.225.149.147 (16 [54749]) |
User-Agent: | Xnews/M3 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Kai Dietrich <toepferei DOT dietrich AT t-online DOT de> wrote on 04 Mrz 2001: >Hi! > >Is this possible: > >class test_class >{ > void methode(test_class *test); >}; > >I need to acces a whole instance of a class in the same >class. Is there a "wourk around"? > There is no need for a work-around. Your declaration of methode() is perfectly legal. Think about the copy-constructor: Class::Class(const Class&). Of course, you will normally get a different instance (object). If you need to access the same object, just access it's members. HTH, Manni
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |