chadkeck
4th November 2008, 04:14
I've got classes set up like so (where an indent is inherits from):
Wizzy
BranchWizzy
InputWizzy
LoopWizzy
NamedWizzy
DatumWizzy
ProcedureWizzy
OutputWizzy
SinkWizzy
SourceWizzy
The problem is that when I try to include and use any class at the same level (e.g. Have an OutputWizzy create a BranchWizzy) it won't compile and gives the following message when trying to instantiate a BranchWizzy:
OutputWizzy.cpp: In constructor `OutputWizzy::OutputWizzy(QObject*)':
OutputWizzy.cpp:9: error: `b' undeclared (first use this function)
OutputWizzy.cpp:9: error: (Each undeclared identifier is reported only once for each function it appears in.)
OutputWizzy.cpp:9: error: `BranchWizzy' is not a type
I'm using Qt 4.4.3 and mingw on Windows XP.
Everything compiles fine if I don't have a Wizzy subclass try to use any other Wizzy subclass.
Here's a snip of the Wizzy.h:
#ifndef WIZZY_H
#define WIZZY_H
#include "Property.h"
#include <QtGui>
class WizzyConnectionPoint;
class Wizzy : public QObject, public QGraphicsPixmapItem
{
Q_OBJECT
public:
Wizzy( QObject* = NULL );
~Wizzy();
/* snip */
};
#endif
The Wizzy subclasses inherit the Wizzy class in a similar manner. I am simply out of ideas of why one subclass "can't see" another.
Any ideas? I can post any other code anyone would like to see. Thanks!
Wizzy
BranchWizzy
InputWizzy
LoopWizzy
NamedWizzy
DatumWizzy
ProcedureWizzy
OutputWizzy
SinkWizzy
SourceWizzy
The problem is that when I try to include and use any class at the same level (e.g. Have an OutputWizzy create a BranchWizzy) it won't compile and gives the following message when trying to instantiate a BranchWizzy:
OutputWizzy.cpp: In constructor `OutputWizzy::OutputWizzy(QObject*)':
OutputWizzy.cpp:9: error: `b' undeclared (first use this function)
OutputWizzy.cpp:9: error: (Each undeclared identifier is reported only once for each function it appears in.)
OutputWizzy.cpp:9: error: `BranchWizzy' is not a type
I'm using Qt 4.4.3 and mingw on Windows XP.
Everything compiles fine if I don't have a Wizzy subclass try to use any other Wizzy subclass.
Here's a snip of the Wizzy.h:
#ifndef WIZZY_H
#define WIZZY_H
#include "Property.h"
#include <QtGui>
class WizzyConnectionPoint;
class Wizzy : public QObject, public QGraphicsPixmapItem
{
Q_OBJECT
public:
Wizzy( QObject* = NULL );
~Wizzy();
/* snip */
};
#endif
The Wizzy subclasses inherit the Wizzy class in a similar manner. I am simply out of ideas of why one subclass "can't see" another.
Any ideas? I can post any other code anyone would like to see. Thanks!