Home > C,C++ > Pointers


Related Categories

C++: Pointers  
Because pointers are so important in C and C++, this chapter will review some of the more important topics concerning pointers. Even if you are extremely conversant in the use of pointers, you should not completely ignore this chapter because some new material unique to C++ is presented here.
Submitted: Feb 16, 2000
A Tutorial on pointers and arrays in C  
Ted Jensen wrote ten chapters about this difficult aspect of C, drawing on his experience discussing pointers and arrays in forums like FidoNet's C Echo and USENET's comp.lang.c newsgroup. He knows his subject and the writing is consistent (the tutorial's welcome page also offers HTML and ASCII versions for download).
Submitted: Dec 19, 1999
Pointers to member functions  
A list of FAQs about pointers.
Submitted: Feb 16, 2000
Smart Pointer C++ Interface Primer  
The Smart Pointer C++ Interface presents the NAO class library as a C++ class library. If this seems a little strange for a C++ class library to have such an interface, it is because we have avoided using the capabilities provided in C++ for altering syntax (overloaded operators). There are several issues here. One is that most other languages do not allow operators to be overloaded, so rather than build the capability into the lowest level of the library, we incorporated it at the topmost level. Another issue was the baggage that a really good implementation of overloaded operators carries. This is easily seen in libraries that implement linear algebra, and provide deferred execution, and temporary matrices. Rather than clutter the lowest level, this functionality (if it exists) is at the topmost level.
Submitted: Feb 16, 2000
Restricted Pointers in C  
For many compiler optimizations, ranging from simply holding a value in a register to the parallel execution of a loop, it is necessary to determine whether two distinct values designate distinct objects. If the objects are not distinct, the values are said to be aliases. It is aliasing through pointers that presents the greatest difficulty, because there is often not enough information available within a single function, or even within a single compilation unit, to determine whether two pointers can point to the same object. Even when enough information is available, this analysis can require substantial time and space. For example, it could require an analysis of a whole program to determine the possible values of a pointer that is a function parameter.
Submitted: Dec 19, 1999

  Privacy - Trademarks - Feedback - Terms of Use Copyright The MathWorks, Inc.