У меня есть 2 простых класса в Arduino Project.:
Классы были помещены в Point.h и Line.h Files. < /p>
#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
< /code>
и: < /p>
#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
< /code>
Конструктор строки дает мне: < /p>
Несколько маркеров на этой строке
- Кандидаты:
- нет функции сопоставления для Call to 'point :: point ()' < /strong> < /p>
Что я делаю не так? Это просто простой пример. < /P>
Спасибо < /p>
Подробнее здесь: https://stackoverflow.com/questions/349 ... onstructor