please help me write a function which will return the last element in an unsorted list.
the prototype of the function should be
ItemType ReturnLastItem();
we should assume that the list is not empty ans it shouldnt change after the program is executed..
pleeeeeeeeease help me
elsa87 0 Junior Poster in Training
Recommended Answers
Jump to PostShow some effort first and then people will help you. Don't expect others to do your work.
Just an idea: The class could contain a static pointer that would point to the last element. You could set it in the constructor.
Jump to Post>please help me write a function which will return the last element in an unsorted list.
How appropriately vague. When you say "last element", what do you mean? Do you mean the physical last item or the last sorted item? When you say "list", do you mean an array or …
Jump to Post>could u help me now?
I'd say no, since you answered neither of my questions.
Jump to Post>this is torture
You got that right.>i have nothing
>no class
>no function
>nothing in the exercise except what i've told u
Then you won't get much help. First, we tend to frown on people who run to us asking for "help" when they haven't done jack squat. …
Jump to PostI didn't wake up this morning with the intention of being a jackass, but if you really want to see how I earned my reputation, I'll be happy to oblige.
Do your damn homework and stop trying to leech off of the kindness of others. If you want help, …
All 20 Replies
minas1 1 Junior Poster in Training
elsa87 0 Junior Poster in Training
elsa87 0 Junior Poster in Training
Narue 5,707 Bad Cop Team Colleague
elsa87 0 Junior Poster in Training
Narue 5,707 Bad Cop Team Colleague
elsa87 0 Junior Poster in Training
minas1 1 Junior Poster in Training
elsa87 0 Junior Poster in Training
minas1 1 Junior Poster in Training
elsa87 0 Junior Poster in Training
minas1 1 Junior Poster in Training
elsa87 0 Junior Poster in Training
minas1 1 Junior Poster in Training
elsa87 0 Junior Poster in Training
minas1 1 Junior Poster in Training
elsa87 0 Junior Poster in Training
Narue 5,707 Bad Cop Team Colleague
elsa87 0 Junior Poster in Training
minas1 commented: Grow up. +0
Narue 5,707 Bad Cop Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.