I am getting an error when I declare a class:
#include <iostream>
#include "testing/test.h"
#include <string>
using namespace std;
int main(void)
{
test links;
string content="this is an string";
links.getcont(content);
}
test.h
#ifndef TEST_H_
#define TEST_H_
#include<string>
using namespace std;
class test {
public:
string getcont(string content);
};
#endif /* TEST_H_ */
test.cpp
#include "test.h"
#include <iostream>
using namespace std;
string getcont(string content)
{
cout << content;
return content;
}
When I run this I get this error:
undefined reference to test::getcont(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)
links.getlinks?