Solved

Virtual function table not found

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

914 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

14 Experts available now in Live!

Get 1:1 Help Now