| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Declaring a pointer to a |
HI neil.
This is a reply to your original question, mainly because the responses you
got confused me.
I commented out the includes and stuck all the code in a single file
(because it was easier tio test that way) it seemed to compile alright
except for the last line.
NH> b_class = new b_class(1, this);
that line won't work by itself - ity neeeds to be inside an A_class member
function - giove an example of how you wanted to use it.
NH> The problem I'm having is that my compiler gives the first error
NH> as: 'a_class': missing decl-specifiers.
the first error I got was about the line above, if you're compine different
code than what you're giving us that cooul dexplain the differences
NH> My questions are: "What are decl-specifiers?".
I don't have a copy of the standard here.
NH> "What did I do wrong here?".
tc++ (tc++ 1.0 lite) complains that you're using "this" outside of member
function.
djgpp (GCC 2.81) thinks you should use a different name for the object
(left of the = in that same line) when I fixed that it complained about
"this" again
I think you need to post an example with more flesh.
I find haviong two different compiilers handy as I can get a second opinion
:)
-=> Bye <=-
---
* Origin: Black Holes were created when God divided by zero! (3:640/1042)SEEN-BY: 633/267 270 @PATH: 640/1042 531 954 774/605 123/500 106/1 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™.