vtable destructor trouble with header and cpp file

Hello everybody,

I'm having a huge problem with this Code. I wanted to declare two variables in my standard constructor and since I tried that it gives me the Error:
error: redefinition of 'openAssembler::openAssembler()'|

This is the header file:
using namespace std;

class openAssembler
{

public:
openAssembler(){
vectorIndex=0;
orgFactor=0;
}
virtual ~openAssembler();

And here we got the cpp
#include "openAssembler.h"
#include <fstream>

using namespace std;

openAssembler::openAssembler(){
vectorIndex=0;
orgFactor=0;
}
openAssembler::~openAssembler(){}


Any help would be highly appreciated. It's a quite important peace ...
Last edited on
You defined the constructor both in the header and the other file. That's what the compiler is complaining about
I thought I need to do that?! So if I just take it out of the cpp and declare the variables in the header file threw the standard constructor it should work?
oh my god. I guess ... I ... just ... forgot a frickin semicolon.

Anyways the whole thing causes trouble. I now wanted to open the class out of the int main function but it tells me:

undefined reference to 'vtable for openAssembler'

and points at this line of the cpp to the first line of:

openAssembler::openAssembler(){
vectorIndex=0;
orgFactor=0;
};

Any idea what that could be???


Oh by the way. Does anybody has an idea how I read a *.asm file in C++???
Last edited on
Topic archived. No new replies allowed.