//return an iterator pointing to the largest element
//in the list.
template list::iterator maxLoc(list& aList);
Write a program taht tests maxLoc(), using the following declarations:
string strArr = ("insert", "erase", "template", "list");
int strSize = sizeof(strArr)/sizeof(string);
list strList(strArr, strArr+StrSize)
The program should repeatedly call maxLoc(), output the largest value, and then delete the value, until the list is empty.
I am attaching a .cpp file of the program. It is mostly complete but when I compile I don't seem to get the right result.
Recently Asked Questions
- Evaluate the article: Leichtentritt, R., Rettig, K. (2001). The construction of the good death: a dramaturgy approach. Journal of Aging Studies, 15 (2001):
- What is a real life example of classic liberalism in todays society?
- In a normal distribution curve What % of the data is more than 2 sigma away from the mean