#include <iostream>
using namespace std;
class Point1 {
public:
int x;
int y;
Point1(int x, int y);
~Point1();
};
Point1::Point1(int x1, int y1) {
x = x1;
y = y1;
cout << "criou" << endl; //estou deixando só para fins didáticos
}
Point1::~Point1() {
cout << "destruiu " << x << " " << y << endl; //para fins de debug
}
int main() {
Point1 C(1, 4);
cout << C.x << endl;
cout << C.y << endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgUG9pbnQxIHsKcHVibGljOgogICAgaW50IHg7CiAgICBpbnQgeTsKCiAgICBQb2ludDEoaW50IHgsIGludCB5KTsKICAgIH5Qb2ludDEoKTsKfTsKClBvaW50MTo6UG9pbnQxKGludCB4MSwgaW50IHkxKSB7Cgl4ID0geDE7Cgl5ID0geTE7Cgljb3V0IDw8ICJjcmlvdSIgPDwgZW5kbDsgLy9lc3RvdSBkZWl4YW5kbyBzw7MgcGFyYSBmaW5zIGRpZMOhdGljb3MKfQoKUG9pbnQxOjp+UG9pbnQxKCkgewogICAgY291dCA8PCAiZGVzdHJ1aXUgIiA8PCB4IDw8ICIgIiA8PCB5IDw8IGVuZGw7IC8vcGFyYSBmaW5zIGRlIGRlYnVnCn0KCmludCBtYWluKCkgewogICAgUG9pbnQxIEMoMSwgNCk7CiAgICBjb3V0IDw8IEMueCA8PCBlbmRsOwogICAgY291dCA8PCBDLnkgPDwgZW5kbDsKfQ==