|
-
Mar 7th, 2003, 12:23 AM
#1
Thread Starter
Addicted Member
Need to get around some pointers
I have a template class that implements a PriorityQueue, the important thing about the PQ is that it requires the < operator and the == operator of the typename that I give it.
So it works great with ints, PriorityQueue<int> is great. But if I use PriorityQueue<int*> i have a problem because it doesn't deference the pointer when doing the comparisons on it. I'm guessing it just compares the pointer address or something.
How can I get it to derefence if the typename if its a pointer and not if its not a pointer. I need this for passing a class as the typename that overloads the < and == ops.
NOMAD
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|