| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Declaring a pointer to a |
NH> file: a.h
NH> class a_class
NH> {
NH> // some stuff
NH> };
I've modified this by adding:
typedef class a_class * pa_class;
NH> file: b.h
NH> #include "a.h"
I've kept this because I DO want to call a_class member functions.
NH> class b_class
NH> {
NH> a_class * pa_class; // the first error... why ?
This line then becomes:
pa_class mpa_class; // <-------- #1
NH> // some other stuff
NH> public: b_class(int, a_class *);
Likewise, this becomes:
public: b_class(int, mpa_class);
NH> }
DM> This should all work fine.
It doesn't. I get three errors (see "#1" above):
pa_class: missing decl-specifiers
syntax_error: missing ';' before identifier mpa_class
mpa_class: missing decl_specifiers
Do you think that the problem is with the compiler and not my code?
This is something I really doubt but for the life of me I can't figure
out what's going on here.
þ CMPQwk 1.42 999
--- Maximus/2 3.01
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)SEEN-BY: 633/267 270 @PATH: 106/2000 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™.