Re: weird error


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

Posted by John Kugelman on March 23, 2001 at 05:40:56:

In Reply to: weird error posted by Anthony Zucaro on March 22, 2001 at 18:53:05:

: Ok, here is my problem, which I'll admit is a bit weird: I have overloaded the equality operator for both the author and book class, as well as the [] operator for the template array class. When I allocate a template statically and use [] in conjunction with ==, no errors ensue. When I allocate the template dynamically however, the same operators ([] and ==) will not work. I get C2440 and C2679 for errors. Why is this and what do I need to do?

What do you mean you allocate the template dynamically? Do you mean you store a pointer to an 'Array ' object?

If that's what you mean (the errors you mention would apply), don't forget to dereference the pointer before you try to access the template class members. 'Array *' is not the same type as 'Array '.


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 ]