Problems inheriting multiple times.

S

Snyke

Well the title says it all:
I'm trying to inherit a Class (a Singleton class) twice.
The only problem is that I get a linker problem: it says it can't find
the external depency for the static pointer to the existing instance.
This only occurs when I try to build my second or third class, the
first inherited class works fine.
Anybody got an idea???
 
T

Thomas Matthews

Snyke said:
Well the title says it all:
I'm trying to inherit a Class (a Singleton class) twice.
The only problem is that I get a linker problem: it says it can't find
the external depency for the static pointer to the existing instance.
This only occurs when I try to build my second or third class, the
first inherited class works fine.
Anybody got an idea???

Show
Some
Code.

Your problem is on line 42 of Unit1.cpp. I believe
you want to remove the ";".


--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top