Re: Correction


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by D. Barnette on March 29, 2001 at 11:46:19:

In Reply to: Re: Correction posted by John Kugelman on March 24, 2001 at 07:20:06:

John's posts are correct. By defining:

ArrayT *book_array = new ArrayT (size)

You've told the compiler to create a pointer to your array template object. If you use the index operator on any ppointer the compiler assumes you've set it to point to an array. In this case it interprets book_array[index] as one element of an array of array template objects.

I don't see any advantage in this program to defining a pointer to either of your array template objects.



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]