ok so i am trying to implement max_element so that it returns a pointer to the max element. i have no idea where to start with this ... any takers?
7 Replies  1487 Views  Last Post: 02 November 2005  05:01 PM
Replies To: need help using generic algorithm max_elemtent
#2
Re: need help using generic algorithm max_elemtent
Posted 27 October 2005  08:33 AM
Do you mean that you are trying to write a function that duplicates the max_element() method?
#3
Re: need help using generic algorithm max_elemtent
Posted 27 October 2005  08:37 AM
ok im really not sure, i have this assignment and all that it says word for word
1. Implement the generic algorithm max_element (see section 2.4.2). The algorithm returns a pointer to the maximum element. Test your function with more than one type of array.
1. Implement the generic algorithm max_element (see section 2.4.2). The algorithm returns a pointer to the maximum element. Test your function with more than one type of array.
#4
Re: need help using generic algorithm max_elemtent
Posted 27 October 2005  09:01 AM
Ok, it sounds like your prof wants you to write your own implementation...can you post the algorithm referred to in your assignment?
#5
Re: need help using generic algorithm max_elemtent
Posted 27 October 2005  06:32 PM
ok well i got it figured out ... thanks for that link to max_element it helped
#6
Re: need help using generic algorithm max_elemtent
Posted 27 October 2005  07:23 PM
Great! If you get a chance, perhaps you'd like to post your solution, so that other memebers may use it as a resource as well.
#7
Re: need help using generic algorithm max_elemtent
Posted 02 November 2005  03:06 PM
where should i do that ... here on this post?
#8
Re: need help using generic algorithm max_elemtent
Posted 02 November 2005  05:01 PM
You can certainly do it here...then when someone is searching for somehting similar, they'll come across it. Thnaks in advance for sharing your solution!
Page 1 of 1
