C++::GET & SET in a header file
<p>I am trying to implement the get() inside a header file of C++:</p>

<p>for example: this is the file: test.hpp</p>

<pre><code>class A {
public:
A(std::string f, int id):file(f), index(id){};

std::string getFile(){return file;};
int getIndex(){return id;};

private:
  std::string file;
  int index;
};
}
</code></pre>

<p>But then I get a problem: undefined reference to `vtable A'. Could you please have a look?</p>

<p>Thanks in advance.</p>
