Re: problem with array template


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

Posted by Daniel Longest on March 20, 2001 at 22:46:59:

In Reply to: problem with array template posted by Rick Craig on March 20, 2001 at 22:28:06:

I'm somewhat confused by exactly what you've done but if I assume you want something like you've tried, that would seem to show that bookArray is an array of pointers to books, in which case you could say (*bookArray[index]).getIsbn to call getIsbn (or you could say bookArray->[index].getIsbn).

Daniel

: hi all, in my database class i have pointers to arrayT* and arrayT* which are declared off the heap in the constructor for database class --- i've overloaded the [] operator in the array template, but am having a problem getting the syntax right to access the data in the array -- since the arrays are declared dynamically i have assumed that to access say a member function in the book class ex: bookClass::getIsbn would be bookArray*[index].getIsbn -- yet this will not compile -- any ideas?




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 ]