one purpose of pointers to to allocate an array of something because the size is not known until the program is run.
Employee* empArray = new Employee[NumberEmployees];
Another purpose: creating a linked list of Employee classes. Admittedly most c++ programmers would using c++ container classes such as vector or dqueue.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Online 21,950 posts
since Aug 2005