help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

what is this error?


From: Gav Wood
Subject: what is this error?
Date: Tue, 02 Nov 2004 15:58:15 +0000
User-agent: KNode/0.8.0

hi all,

i'm trying to compile (fairly simple) code that uses inheritance:

it looks like this:

namespace geddei {
        class Processor: ...
        {
                Processor(const QString &type): ... {}
        };
}

class NProcessor: virtual public geddei::Processor, ...
{
        NProcessor(const QString &type, int a): Processor(type), ... {}
};

class TMO: public NProcessor
{
        TMO(): NProcessor("TMO", 1) {}
};

the error i'm getting is:

/home/gav/Projects/geddei/src/tests/testmulti.cpp:388: error: no matching
function for call to `geddei::Processor::Processor(const <anonymous>**)'
/home/gav/Projects/geddei/src/geddei/processor.h:112: error: candidates are:
geddei::Processor::Processor(const geddei::Processor&)
/home/gav/Projects/geddei/src/geddei/processor.h:561: error:
geddei::Processor::Processor(const QString&)

the error points to the TMO constructor line: if i comment out the class
TMO, it compiles fine. i dont see why this is, since TMO doesn't (directly)
refer to Processor.

i also have no idea where the "const <anonymous>**" is coming from.

could it be something to do with my virtual inheritance?

any other ideas?

gav

-- 
York


reply via email to

[Prev in Thread] Current Thread [Next in Thread]