Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Virtual function table not found

Posted on 2001-06-12
5
Medium Priority
?
232 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 200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

885 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