Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Thing {
- public:
- int m_Integer = 0;
- Thing() {
- std::cout << "Thing constructor has been called! Address: " << this << ".n ";
- }
- ~Thing() noexcept {
- std::cout << "Thing destructor has been called! Address: " << this << ".n";
- }
- static Thing CreateInstance() {
- return Thing();
- }
- void* GetThis() {
- return this;
- }
- };
- void* hThing = Thing::CreateInstance().GetThis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement