I am trying to implement a queue based on a Linked List that I had to write previously. It is templated and for some reason I am getting the following error using g++ when I compile:
Our professor gave us a skeleton of the code and it already had the return statement in it so I didn't change it. The LinkedList = operator overload returns a pointer as well.
Well the definition is within the class and classes can access their own private data members so ya it should work. I tried putting it in the public section just to check and it did the same thing. As to your example thats basically the same thing that im trying to do. I don't see why mine doesnt work.
Well the definition is within the class and classes can access their own private data members so ya it should work. I tried putting it in the public section just to check and it did the same thing. As to your example thats basically the same thing that im trying to do. I don't see why mine doesnt work.
I'm not sure about this.
Function can access IT'S own members (this->memb1; this->memb2
But I'm really not sure about accessing other instance of same type...
I'm not sure about this.
Function can access IT'S own members (this->memb1; this->memb2
But I'm really not sure about accessing other instance of same type...
Maybe your problem is in something else...
I have done something very similar to that previously so I am pretty sure thats not the problem.
BTW Thanks to everyone thats been trying to help. This is getting really frustrating.
I think its zipped now thats the first time I have done that. I am sorry its been so long. I had an emergency that kept me from the computer for a couple days. Im back now and still annoyed by this error.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.