In C++ methods and functions can be "declared" or "defined".
With declaration you trll the compiler that a certain function or object will be available in the program, even without providing for example the actual function body at the moment.
With definition you actually provide the function body or the storage and initialization for an object.
extern int foo; // this is an integer DECLARATION
int foo = 4; // this is the DEFINITION
double square(double x); // function DECLARATION
// function DEFINITION
double square(double x) {
return x*x;
}
For classes things are a bit more complex, because the two concepts are a bit messed up. Providing two definitions for example would be logically bad, but is allowed in C++ if they are absolutely identical token by token and with the same meaning of all tokens.
Also with classes there are implicit methods that are created automatically by default if you don't provide them. For example when you write:
class Point
{
public:
double x, y;
};
the compiler automatically completes your code as if you wrote instead
class Point
{
public:
double x, y;
// default constructor
Point()
{
}
// copy constructor
Point(const Point& other)
: x(other.x), y(other.y)
{
}
// assignment operator
Point& operator=(const Point& other)
{
this->x = other.x;
this->y = other.y;
return *this;
}
// destructor
~Point()
{
}
};
All those are both declarations and definitions.
If however you provide just the declaration for one of the implicitly provide methods (like you did for the constructor in your class) then the compiler assumes that you want to implement it yourself in a different way and the default definition will not be automatically generated.
This is the reason for your compile error: the default constructor was declared but was not defined and when assembling up the executable the compiler was missing some parts.
Please also note that C++ is a very complex language with a lot of apparently illogical (and sometimes just illogical) parts and is not a good candidate for learning by experimenting. The only reasonable way to learn C++ is to start form a good book and reading it from cover to cover...