Search:

Type: Posts; User: arstacey

Search: Search took 0.00 seconds.

  1. Thread: Homework Help

    by arstacey
    Replies
    15
    Views
    3,117

    OK, now I have template ...

    OK, now I have



    template <typename T>
    list<T>::iterator maxLoc(list<T>& aList);
    {
    //loop reads through the list and sets the maxLoc to equal iter if iter is greater than the current maxLoc...
  2. Thread: Homework Help

    by arstacey
    Replies
    15
    Views
    3,117

    I'm sorry, but he did. I see what you are...

    I'm sorry, but he did.

    I see what you are saying though and what kind of problems will arise. I changed the variable to max instead.
  3. Thread: Homework Help

    by arstacey
    Replies
    15
    Views
    3,117

    I now have two issues. I do not have a very good...

    I now have two issues. I do not have a very good understanding of tmplate based functions (we really have spent no time on them). It has also been a long time since I had to deal with reference...
  4. Thread: Homework Help

    by arstacey
    Replies
    15
    Views
    3,117

    Thanks, Daved. I am trying to figure that out...

    Thanks, Daved. I am trying to figure that out now. I am not very good at functions so will probably post for more help later if I can't work it out.
  5. Thread: Homework Help

    by arstacey
    Replies
    15
    Views
    3,117

    Thanks, Daved. I really appreciate it.

    Thanks, Daved. I really appreciate it.
  6. Thread: Homework Help

    by arstacey
    Replies
    15
    Views
    3,117

    1) Because that is what my instructor...

    1) Because that is what my instructor specifically asked for.
    2) Is this wrong? I wanted maxLoc to originally equal the first element so that when iter runs through the list, it has something...
  7. Thread: Homework Help

    by arstacey
    Replies
    15
    Views
    3,117

    ::bangs head on desk:: I have fought over this...

    ::bangs head on desk::

    I have fought over this for three days. That line is actually what my instructor sent me so I never questioned that line.

    It worked...sort of. I changed it to
    ...
  8. Thread: Homework Help

    by arstacey
    Replies
    15
    Views
    3,117

    Homework Help

    I have a homework assignment I am having trouble with. The instructions are:

    Implement the function maxLoc(), which return an iterator pointing at the largest element in a list.

    // return an...
Results 1 to 8 of 8