Article View: alt.comp.lang.learn.c-c++
Article #117Re: void * question
From: Jack Klein
Date: Sat, 13 Nov 1999 00:00
Date: Sat, 13 Nov 1999 00:00
41 lines
2097 bytes
2097 bytes
On Sat, 13 Nov 1999 14:10:48 -0800, Bud - Inreach <bud@inreach.com> wrote in alt.comp.lang.learn.c-c++: > I've run into a little problem. I have 3 templated binary sort trees as > private data. I also have a pointer to the current tree I want to work > with. I set the current tree via user input. What I am trying to do is > simply say: > > CurrentTree = &MyFirstTree; > CurrentTree->OrderedDisplay(); > > CurrentTree = &MySecondTree(); > CurrentTree->OrderedDisplay; > > and so on... > > I've tried making CurrentTree a Tree *, and a void *; Neither of which > worked... > > I would appreciate any help.. if you could email me a response I would > appreciate it. > > Thanks, > > Bill Asking for email responses in programming groups is considered rude for a variety of reasons. Post here, read here. "Doesn't work" does not provide much information. You can't dereference a pointer to void, so that surely won't work. As to being unable to get a pointer to Tree to work, post the smallest code sample which exhibits your problem. Explain what you want it to do and what it does instead. If you can't see what you are doing wrong while looking at your code, how can anyone else figure it out without seeing it? Jack Klein -- Home: http://jackklein.home.att.net
Technical Details
Message-ID:
<9+otOPwL4+5VU3AoqyWBrn2Bd7wW@4ax.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<382DE1E8.5E28B74@inreach.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114592,934b7acecdc4904d X-Google-Attributes: gid114592,public X-Google-Thread: 10d4ba,934b7acecdc4904d X-Google-Attributes: gid10d4ba,public From: Jack Klein <jackklein@att.net> Subject: Re: void * question Date: 1999/11/13 Message-ID: <9+otOPwL4+5VU3AoqyWBrn2Bd7wW@4ax.com> X-Deja-AN: 548266586 Content-Transfer-Encoding: 7bit References: <382DE1E8.5E28B74@inreach.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc02.worldnet.att.net 942533450 6758 12.75.43.216 (13 Nov 1999 22:50:50 GMT) Organization: AT&T WorldNet Services Mime-Version: 1.0 NNTP-Posting-Date: 13 Nov 1999 22:50:50 GMT Newsgroups: alt.comp.lang.learn.c-c++,att.lang.c++