#include<iostream>
using namespace std;
class First{
public:
int i;
First(int z) : i(z) {};
First* fobj2;
void makeobject(){ //function returns nothing, just"WORKS"
fobj2=new First(11);
//delete fobj2;
//return fobj2.i; //i do not want the function to send it...
}
};
int main(){
First f(8);
cout<<f.i<<endl;
First*po; //let's say this is ok, let it for later...
po=new First(7);
cout<<f.i<<endl;
cout<<po->i<<endl;
delete po;
cout<<f.fobj2->i<<endl;
delete f.fobj2;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgoKY2xhc3MgRmlyc3R7CgogIHB1YmxpYzoKCiAgIGludCBpOwoKICAgIAogICAgRmlyc3QoaW50IHopIDogaSh6KSB7fTsKICAgIAogICAgRmlyc3QqIGZvYmoyOwoKICAgIHZvaWQgbWFrZW9iamVjdCgpeyAgLy9mdW5jdGlvbiByZXR1cm5zIG5vdGhpbmcsIGp1c3QiV09SS1MiCgogICAgICAgCgogICAgICAgIGZvYmoyPW5ldyBGaXJzdCgxMSk7CgogICAgICAgIC8vZGVsZXRlIGZvYmoyOwoKICAgIC8vcmV0dXJuIGZvYmoyLmk7ICAvL2kgZG8gbm90IHdhbnQgdGhlIGZ1bmN0aW9uIHRvIHNlbmQgaXQuLi4KCiAgICB9Cn07CgoKCmludCBtYWluKCl7CgogICAgRmlyc3QgZig4KTsKCiAgICBjb3V0PDxmLmk8PGVuZGw7CgogICAgCgogICAgRmlyc3QqcG87ICAgLy9sZXQncyBzYXkgdGhpcyBpcyBvaywgbGV0IGl0IGZvciBsYXRlci4uLgoKICAgIHBvPW5ldyBGaXJzdCg3KTsKCiAgICAKCiAgICBjb3V0PDxmLmk8PGVuZGw7CgogICAgY291dDw8cG8tPmk8PGVuZGw7CgogICAgZGVsZXRlIHBvOwoKICAgIAoKICAgIGNvdXQ8PGYuZm9iajItPmk8PGVuZGw7CgogICAgZGVsZXRlIGYuZm9iajI7CgogICAgCgogICAgcmV0dXJuIDA7Cgp9Cgo=