| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Declaring a pointer to a |
I've found a programmatic solution that I think should heal the lame and
let the blind see. Unfortunately, my compiler doesn't share the same
opinion. The situation is like this:
file: a.h
class a_class
{
// some stuff
};
file: b.h
#include "a.h"
class b_class
{
a_class * pa_class; // the first error... why ?
// some other stuff
public: b_class(int, a_class *);
}
What I want to do is have a pointer to a_class inside b_class.
Theoretically the way I would give it a value would be like this:
file: a.cpp
#include "b.h"
b_class = new b_class(1, this);
The problem I'm having is that my compiler gives the first error as:
'a_class': missing decl-specifiers.
My questions are: "What are decl-specifiers?".
"What did I do wrong 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™.