Solved

Virtual function table not found

Posted on 2001-06-12
5
216 Views
Last Modified: 2010-04-02
What's wrong with this, and how can I make it better?

//Code

class te{
public:
  static class ted t;
  virtual void f1(void)=0;
  virtual void f2(void);
};

class ted:public te{
public:
  void f1(void);};

ted te::t;

void main(void){}


Undefined                       first referenced
 symbol                             in file
te virtual table                    te.o
ted virtual table                   te.o
0
Comment
Question by:glebspy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6180467
Do you actually have implementations for the f1() and f2()? i.e. is there something else besides this file.
0
 
LVL 6

Expert Comment

by:MichaelS
ID: 6180575
>class te{
>public:
>static class ted;

>class ted:public te

That one I really can't get. What are you trying to do?

class ted derived from te which contains ted which derived from te which contains ted.......

Is it some Recurcive derivation?
0
 
LVL 2

Expert Comment

by:MadYugoslav
ID: 6180631
Sutisfy this two rules:
1. You must implement all functions for an instance of class. You can not make instance of class if that class don't have implementations for all methods (functions).
2. You can not make instance of some class with pure virtual methods (functions).
0
 
LVL 2

Accepted Solution

by:
MadYugoslav earned 50 total points
ID: 6180658
Sutisfy this two rules:
1. You must implement all functions for an instance of class. You can not make instance of class if that class don't have implementations for all methods (functions).
2. You can not make instance of some class with pure virtual methods (functions).
0
 
LVL 1

Author Comment

by:glebspy
ID: 6180776
Thanks, that did it-
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question