unsigned int apperantly being passed as pointer for no reason

this is a constructor for a class
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Prob::Prob()
{
    unsigned int i = 0;
    //seed generator for latter use
    srand(std::time(0));
    properTime = 0;
    List dielema = List();
    properTime = 0;
    while(properTime < SECONDS_WORKED)
    {
        dielema.insert(whenCaged(), Drib::getRandomNumber(0, TREE_HEIGHT-1), i);
        i++;
    }
    
}


when I compile it says " error: no matching function for call to `List::insert(unsigned int, unsigned int, unsigned int*)'"
why and how do I correct this? why is it treating i as a pointer (that's the problem right?)
Last edited on
Post List.
If it were a wrong type being passed as a pointer, the compile error would have said so.

Are you sure Drib::getRandomNumber(0, TREE_HEIGHT-1) and whenCaged() return an unsigned int?
Last edited on
Topic archived. No new replies allowed.