Board index » cppbuilder » Deleting pointers
2004-10-14 09:55:15 PM
I am trying to understand some things about pointers
1) Dereferencing pointers : I have a complex c++ builder project with Delphi
units, standard C units and C++ units. There is a heavy use
of pointers in each of these units. I understand I have to dereference
pointers after using them especially if the unit is accessed repeatedly
a program (?) In C I do *p=0. In C++ I do "delete ***p". Does
dereferencing fail? How so and how to avoid problems?
2) When creating pointers, or allocating the memory for pointers, why do
failures happen? Can it all be solved by dereferencing properly?