TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: Neil Heller
from: Darin McBride
date: 2003-01-13 20:56:32
subject: Declaring a pointer to a

Hello Neil!

Replying to a message of Neil Heller to Jasen Betts:

 JB>> I think you need to post an example with more flesh.

 NH> Therein lies a problem.  The code is hundreds of lines long and it's 
 NH> encased in a Windows program.  Yes, I'm aware that I could CSPLIT it
 NH> and  post it in several parts but sheesh, I'm convinced that there's
 NH> got to  be a "simple" solution.

Yes - pare it down to the smallest compilable version that shows your
problem.  Or, in your case, the smallest version that seems to be
syntactically correct - i.e., if you removed the line(s) with the errors,
it would now compile.  What you gave doesn't compile because there is no
"this" in your .cpp example.  It doesn't even really need to have
main() since you're not worried about its output.

 NH> The situation is that I wish to create the object in a member
 NH> function.   Then I need to manipulate the data in an unrelated class
 NH> WITHOUT  creating a new object in that unrelated class.  I thought
 NH> that I could  succeed by passing pointers to the original class,
 NH> but...

I used to do this all the time.  It should work.

 JB>> I find haviong two different compiilers handy as I can get a second
 JB>> opinion :)

 NH> An excellent idea.

So the obvious question is: what compiler are you using now?

Darin
C_PLUSPLUS moderator
dmcbride{at}tower.to.org

---
* Origin: Tanktalus' Tower BBS (1:250/102)
SEEN-BY: 633/267 270
@PATH: 250/102 99 10/345 379/1 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.