need help using generic algorithm max_elemtent

need help using generic algorithm max_el

Page 1 of 1

7 Replies - 1534 Views - Last Post: 02 November 2005 - 05:01 PM Rate Topic: -----

#1 akujin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 27-October 05

need help using generic algorithm max_elemtent

Posted 27 October 2005 - 08:28 AM

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?
Is This A Good Question/Topic? 0
  • +

Replies To: need help using generic algorithm max_elemtent

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

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?
Was This Post Helpful? 0
  • +
  • -

#3 akujin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 27-October 05

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.
Was This Post Helpful? 0
  • +
  • -

#4 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

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?
Was This Post Helpful? 0
  • +
  • -

#5 akujin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 27-October 05

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
Was This Post Helpful? 0
  • +
  • -

#6 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

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.
Was This Post Helpful? 0
  • +
  • -

#7 akujin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 27-October 05

Re: need help using generic algorithm max_elemtent

Posted 02 November 2005 - 03:06 PM

where should i do that ... here on this post?
Was This Post Helpful? 0
  • +
  • -

#8 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

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!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1