I have a class named Symbol and I would like to create a QVector subclass (Symbols) to add some useful methods. But when I use Symbols from another class A, the compiler gives the error 'Symbols does not name a type'.
class Symbols: public QVector< Symbol >
{
public:
Symbols() {}
// Useful methods
QSymbol findSymbol(const QString &name);
// ...
};
class A
{
private:
Symbols symbols;
};
Is it correctly subclassed?
Why appears 'Symbols does not name a type' when compiles class A?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…