You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Doesn't seem to compile.
The search doesn't work. I may be repeating myself, but the question is: can a class object destroy itself? I.e. first we get a reference of the object to itself in the class object using the reserved word this, then we apply the delete operator to the corresponding object descriptor (pointer).
Something like:
Or is it better/preferable to delete an object "externally" rather than "internally"?
I also wondered about this issue. The conclusion is the following: the object can delete itself (painlessly), but we must remember that after that the object data (variables) will not exist, so no calls to them. But imho this is a messy way, better outside.
Maybe start by reading the documentation for the language you intend to work with, and see the definitions used for the purposes of that programming language?
Respectfully.
You are thinking in the right direction.
This code does not compile
That's because the ; in line 7 is missing, while lines 6 and 5 don't need it.
You're thinking in the right direction.
This code does not compile
That's because the ; in line 7 is missing, while lines 6 and 5 don't need it.
Doesn't seem to compile.
It compiles (well, I'm not picky about semicolons ;-) ).
So the questioner has exactly the problem with them.
In general, it's such trifles...
This code does not compile
That's because the ; in line 7 is missing, while lines 6 and 5 don't need it.