Код: Выделить всё
Punto operator+(Punto p){
return Punto(this->x + p.x, this->y + p.y, this->z + p.z);
}
Punto operator+(Punto *p){
return Punto(this->x + p->x, this->y + p->y, this->z + p->z);
}
Punto operator-(Punto p){
return Punto(this->x - p.x, this->y - p.y, this->z - p.z);
}
Punto operator-(Punto *p){
return Punto(this->x - p->x, this->y - p->y, this->z - p->z);
}
Punto *operator=(Punto p){
this->x = p.x;
this->y = p.y;
this->z = p.z;
return this;
}
Punto *operator=(Punto *p){
this->x = p->x;
this->y = p->y;
this->z = p->z;
return this;
}
Код: Выделить всё
p = fem->elementoFrontera[i]->nodo[0] - fem->elementoFrontera[i]->nodo[1];
Код: Выделить всё
p = fem->elementoFrontera[i]->nodo[0] + fem->elementoFrontera[i]->nodo[1];
В функции-члене void
mdTOT ::pintarElementosFrontera()':
ошибка: недопустимые операнды типов
Punto*' и Punto*' в двоичный
operator+'
Подробнее здесь: https://stackoverflow.com/questions/100 ... om-c-class
Мобильная версия