Sunday, July 12, 2009

What is the difference between c and cpp pointers?

As the first responder stated, pointers in C and C++ are the same.





C++ has added references, which allows one to use pointers, but with a syntax that's easier to pass as parameters.





C++ provides constructors and destructors for objects, so any pointers allocataed in the constructor can be guaranteed to be cleaned up in the destructor. This should help to reduce memory leaks.

What is the difference between c and cpp pointers?
a pointer is a pointer, so a pointer in c is equivelant to a pointer in c++.

blazing star

No comments:

Post a Comment