Welcome! Log In Create A New Profile

Advanced

linkedList.h and orderedLinkedList.h error

Posted by sombu 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
linkedList.h and orderedLinkedList.h error
February 16, 2010 10:37AM
Dear Students

If you experience a problem using linkedList.h and orderedLinkedList.h files form Malik, try to use a modified versions available on osprey and myUnisa.

Regards,
COS211X Lecturers
Re: linkedList.h and orderedLinkedList.h error
February 22, 2010 09:50PM
Hi
Where can I get the full set of source code (from all the chapters)? I want to also do question 5 but I'm not going to sit through another 2 hours of typing code out from the book (since we can't use the STL).
Thank you, Unisa for sending me a blank Software CD - it won't surprise me if I was suppose to download it from that.
Re: linkedList.h and orderedLinkedList.h error
March 05, 2010 04:10PM
Hexium, LOL, so sorry man.
I can imagine how furius you must have been, but
each time I read this msg, i can't help my self.

It even got to the point whereby my gf thinks I'm reading this msg
even when I'm reading these ... emails.

Thats a classic man.
Did you manage to get it in time though?
avatar Re: linkedList.h and orderedLinkedList.h error
March 10, 2010 09:41PM
@hexium
just seen it today, i wish i had found it before the assignment was due, might have saved me a bit of time...
You can download it from Disk 2010 found here Malik Downloads
Re: linkedList.h and orderedLinkedList.h error
March 15, 2010 09:31PM
Thanks guys
My biggest problem was that I didn't have Internet at that time....I later got the files from the download site and I hear there's a new CD waiting for me.
Re: linkedList.h and orderedLinkedList.h error
August 15, 2010 10:34PM
The link asks for a username and password, and my Osprey forum one doesn't work. Where can I get these files from? I got a damaged disc from UNISA.
avatar Re: linkedList.h and orderedLinkedList.h error
August 16, 2010 01:20AM
Look in your tutorial letters for the username and password.
Re: linkedList.h and orderedLinkedList.h error
August 16, 2010 05:04PM
Hi All, I have done exactly the ERRATA stated for the error on compiling the unorderedlinklist / orderedlinkedlist class i.e to change the inherited data member(first,count, and last) to this->first, this->count, this-> last but still its failing. The error i get now is as follows:

\tshax\/linkedList.h C:\tshax\C
In instantiation of `LinkedListType<int>':

13 C:\tshax\orderedLinkedList.h
instantiated from `orderedLinkedListType<int>'

10 C:\tshax\testProgLinkedList.cpp
instantiated from here

error C:\tshax\linkedList.h:18
template-id `operator<< <>' for `std::basic_ostream<char, std::char_traits<char> >& operator<<(std::basic_ostream<char, std::char_traits<char> >&, const LinkedListType<int>&')' does not match any template declaration


Please somone assist confused smiley
avatar Re: linkedList.h and orderedLinkedList.h error
August 16, 2010 05:42PM
OK, one thing I see there is a capital L in the name of linkedListType. Maybe your constructor has a typo in it?

(From the messages it looks to me like you're getting your error from the constructor, ja?)

It's probably some small detail like that. Go to the line and try not to assume it must be right. Criticise it in the minutiae, and see how it goes.
avatar Re: linkedList.h and orderedLinkedList.h error
August 16, 2010 11:50PM
I'm going to take a stab in the dark and assume that if you have the following:
orderedLinkedList<int> list;

Then you did something like this:
cout << list;

Am I right?
Re: linkedList.h and orderedLinkedList.h error
August 17, 2010 08:49AM
Quote

Look in your tutorial letters for the username and password.
*cough*
Thanks.
avatar Re: linkedList.h and orderedLinkedList.h error
August 17, 2010 10:27AM
robanaurochs Wrote:
-------------------------------------------------------
> I'm going to take a stab in the dark and assume
> that if you have the following:
> orderedLinkedList list;
>
> Then you did something like this:
>
> cout << list;
>
> Am I right?


I gave up on this and just removed the reference to "friend" and set the private to public variables. Since I'm anyway only cut 'n pasting the functions for the question, don't care.

Also, doing this under LINUX as I struggle to code with GUIs and like my command line (terminal).

--------------------------------------------------------------
Don't Assume Everything is a Nail Just Because You Have a Really Big Hammer
Re: linkedList.h and orderedLinkedList.h error
August 17, 2010 10:48AM
cbrunsdonza Wrote:
-------------------------------------------------------
> robanaurochs Wrote:
> --------------------------------------------------
> -----
> > I'm going to take a stab in the dark and assume
> > that if you have the following:
> > orderedLinkedList list;
> >
> > Then you did something like this:
> >
> > cout << list;
> >
> > Am I right?
>
>
> I gave up on this and just removed the reference
> to "friend" and set the private to public
> variables. Since I'm anyway only cut 'n pasting
> the functions for the question, don't care.
>
> Also, doing this under LINUX as I struggle to code
> with GUIs and like my command line (terminal).

Were you overloading the << operator as private?
avatar Re: linkedList.h and orderedLinkedList.h error
August 17, 2010 11:54AM
If I'm correct, you don't have the following function defined.
template <typename Type>
std:: ostream &operator << (std:: ostream &outputStream, orderedLinkedList<Type> const &list);

The error is being raised on line 18 in linkedList.h. Go look what's on that line.

@Chris

Don't change the access types, keep the friend in place. Just make sure that the template keyword is in place

Also, Qt was designed to be platform independant. You shouldn't have any trouble with unix/linux and your results should be the same.
avatar Re: linkedList.h and orderedLinkedList.h error
August 17, 2010 03:42PM
robanaurochs Wrote:
-------------------------------------------------------
> If I'm correct, you don't have the following
> function defined.
> template
> std:: ostream &operator << (std:: ostream
> &outputStream, orderedLinkedList const &list);
>
>
> The error is being raised on line 18 in
> linkedList.h. Go look what's on that line.
>
> @Chris
>
> Don't change the access types, keep the friend in
> place. Just make sure that the template keyword is
> in place
>
> Also, Qt was designed to be platform independant.
> You shouldn't have any trouble with unix/linux and
> your results should be the same.



Agree but my g++ KungFu is not strong and no time to resolve it right now. Will ask some of the other guys at work on Friday (our work avoidance day) what I was doing wrong. Its should be working but its obvious I'm overlooking something.

--------------------------------------------------------------
Don't Assume Everything is a Nail Just Because You Have a Really Big Hammer
avatar Re: linkedList.h and orderedLinkedList.h error
August 17, 2010 03:44PM
Rbuys Wrote:
-------------------------------------------------------
> cbrunsdonza Wrote:
> --------------------------------------------------
> -----
> > robanaurochs Wrote:
> >
> --------------------------------------------------
>
> > -----
> > > I'm going to take a stab in the dark and
> assume
> > > that if you have the following:
> > > orderedLinkedList list;
> > >
> > > Then you did something like this:
> > >
> > > cout << list;
> > >
> > > Am I right?
> >
> >
> > I gave up on this and just removed the
> reference
> > to "friend" and set the private to public
> > variables. Since I'm anyway only cut 'n pasting
> > the functions for the question, don't care.
> >
> > Also, doing this under LINUX as I struggle to
> code
> > with GUIs and like my command line (terminal).
>
> Were you overloading the << operator as private?

No, I removed it from the class. Saw another thread from another UNI where guy had the same problem with me and the only quick solution was to do that. Worked fine but I had to make the variables (first, count, last) all public.

Not the solution I want and I really want to do this properly.

--------------------------------------------------------------
Don't Assume Everything is a Nail Just Because You Have a Really Big Hammer
Sorry, only registered users may post in this forum.

Click here to login