Hi. I'm new to this whole stuff, and I'm trying to make my own class to solve a range of maths problems. The class, unruprisingly, is called numbers.
There are 3 files which are causing me problems: numbers.h, problem27.cpp, numbers.cpp. I'll include the sources below. My problem is the error message, when I try to execute problem27.cpp.
/home/bumcheekcity/Desktop/C++/euler/problem27/src/problem27.cpp:13: undefined reference to `numbers::numbers()'
Line 13, btw, is the line numbers num; in problem27.cpp. What am I doing wrong? I'm using "Problem Solving, Abstraction and Design in C++" by Friedman to help me learn, and programming on Ubuntu Linux, using KDevelop. Any assistance will be much appreciated.
//These lines are used to make sure that there are no problems with multiple definitions.
using namespace std;
int main(int argc, char *argv)
cout << "is the value";
cout << "is the new value";
//Here are the two constructors, one with, one without argument.
value = 0;
value = initial_value;
void set_value(float new_value)
value = new_value;