+ 1

Object Question

Why is the object instantly destroyed and why can I still access it's member variable? https://code.sololearn.com/cPpByiqHmpiE/?ref=app

15th Dec 2019, 4:26 AM
Daniel Cooper
Daniel Cooper - avatar
2 Respostas
+ 2
~ swim ~ Yea, I googled it and an unnamed object will be immediately destroyed. I can keep it alive with the new keyword but then I have to delete it. Oh well
15th Dec 2019, 5:53 AM
Daniel Cooper
Daniel Cooper - avatar