I do have 2 simple classes in an Arduino Project.:
The classes were put in Point.h and Line.h files.
#include "Arduino.h"
#ifndef Point_h
#define Point_h
class Point{
public:
Point(int x);
int getPunkt();
void setPunkt(int x);
private:
int _x;
};
/////////////////////////////////
Point::Point(int x){
_x = x;
}
int Point::getPunkt(){
return _x;
}
void Point::setPunkt(int x){
_x = x;
}
#endif
And:
#include "Point.h"
#ifndef Line_h
#define Line_h
class Line{
public:
Line(Point p1, Point p2);
private:
Point _p1;
Point _p2;
};
Line::Line(Point p1, Point p2){
_p1 = p1;
_p2 = p2;
}
#endif
The constructor of Line gives me:
Multiple markers at this line - candidates are: - no matching function for call to 'Point::Point()'
What am I doing wrong? This is just a simple example.
Thank you