Article View: alt.comp.lang.learn.c-c++
Article #370Re: Class and pointer problem
From: wienw
Date: Wed, 30 Jun 1999 00:00
Date: Wed, 30 Jun 1999 00:00
30 lines
1544 bytes
1544 bytes
That is also a good method!
In article <37794056.6D1DC546@bridge.bst.bls.com>,
Steve Horne <steve.horne1@bridge.bst.bls.com> wrote:
> Magnus Hult wrote:
> >
> > declare variables and so on, but apparently it does. Is my compiler
too old,
> > or is there a better way to solve the problem?
>
> Yes, it's called "forward declaration". It works like this:
>
> class Object; // this is the forward declaration
>
> Object *ptr; // Pointers to declared but undefined things are OK.
>
> class Object {
> public:
> // your definition
> };
>
> Hope this helps,
> -Steve
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Technical Details
Message-ID:
<7lbmuf$ves$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<S3be3.496$nZ5.796@nntpserver.swip.net> <37794056.6D1DC546@bridge.bst.bls.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8d38,c03b176bbf53f537 X-Google-Attributes: gidf8d38,public X-Google-Thread: 109fba,c03b176bbf53f537 X-Google-Attributes: gid109fba,public X-Google-Thread: 114592,c03b176bbf53f537 X-Google-Attributes: gid114592,public From: wienw@my-deja.com Subject: Re: Class and pointer problem Date: 1999/06/30 Message-ID: <7lbmuf$ves$1@nnrp1.deja.com> X-Deja-AN: 495371596 References: <S3be3.496$nZ5.796@nntpserver.swip.net> <37794056.6D1DC546@bridge.bst.bls.com> X-Http-Proxy: 1.0 x31.deja.com:80 (Squid/1.1.22) for client 128.248.141.125 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Wed Jun 30 00:04:38 1999 GMT Newsgroups: alt.comp.lang.learn.c-c++,borland.public.cpp.language,comp.lang.c++ X-Http-User-Agent: Mozilla/4.04 [en] (Win95; I)