Thread: Need help with a function...

  1. #1
    Registered User
    Join Date
    Dec 2001

    Exclamation Need help with a function...

    Hey, my problem is that i have a function to make with the declaration as such:

    int cleanest(Vector<List<int> >);

    it is a functoin that looks through a vector of linked lists and returns the subscript address ( [ ] ) of the cleanest element in the Vector by adding up all of the items in the list of the vector.

    Its confusing me quite a bit and im not exactly sure how to do it. You have to look through it a random number of times between 1 and 5. Here is what i have so far for the code (not too much).

    int cleanest(Vector<List<int> > Dishmachine)
    for (int l = 0; l < (rand()%5+1); l++)

    return cleanest;

    If you can help me with my problem that would be greatly appreciated, cause its giving me a lot of problems.
    Thanks ALot.

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    I have not the faintest idea what it is you are trying to do! What is the "cleanest" and why the need for randoms?
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  3. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  4. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  5. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 06:44 PM