class method error in c++
<p>I am getting an error when I declare a class:</p>

<pre><code>#include &lt;iostream&gt;
#include "testing/test.h"
#include &lt;string&gt;
using namespace std;

int main(void)
{    
    test links;
    string content="this is an string";
    links.getcont(content);
}
</code></pre>

<h3>test.h</h3>

<pre><code>#ifndef TEST_H_
#define TEST_H_
#include&lt;string&gt;
using namespace std;
class test {    
  public:    
    string getcont(string content); 

};

#endif /* TEST_H_ */
</code></pre>

<h3>test.cpp</h3>

<pre><code>#include "test.h"
#include &lt;iostream&gt;
using namespace std;    
string getcont(string content)    
{
    cout &lt;&lt; content;
    return content;
}
</code></pre>

<p>When I run this I get this error:</p>

<pre><code>undefined reference to test::getcont(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;)
</code></pre>
