Solved

Virtual function table not found

Posted on 2001-06-12
5
176 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
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

746 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now