#include using namespace std; void testOperators(); void testConstructors(); class Punto{ public: float x,y; /**** COSTRUTTORI ****/ Punto() = default; // costruttore di default; Punto(float x1, float y1){ // costruttore x = x1; y = y1; } Punto(const Punto& puntoDaCopaire){ // costruttore di copia x = puntoDaCopaire.x; y = puntoDaCopaire.y; } Punto(Punto&& puntoDaMuovere) noexcept{ // move constructor } /**** DISTRUTTORE ****/ ~Punto(){ cout<<"BYE!"<>(istream& inputStream, Punto& p){ return inputStream>>p.x>>p.y; } int main(){ testConstructors(); testOperators(); return 0; } void testConstructors(){ Punto p1; // OK, costruttore di default //Punto px(); // NO! Il compilatore si inceppa (fa eseguire ma non accedere ai dati) Punto p2{}; // OK, costruttore di default Punto p3(1,2); // OK Punto p4(3,4); // OK Punto p5(p3); //OK, costruttore di copia Punto p6{p4}; // OK; costruttore di copia cout<>p1; cout<<"Coordinata X: "<>p2; cout<<"Coordinata X: "<