Doesn`t fill a line item to add

Doesn`t fill a line item to add. Please, help me


1
2
3
4
5
6
7
8
9
10
11
12
13
14
    int addGame (int pos)
    {
        if(pos<0 || pos>SIZE)
            throw WrongNumber;
 
        for (int i = pos; i < SIZE; ++i)
        {
            game[SIZE-1].setSize((rand() % 10)+1);
            game[SIZE-1].setAmount((rand() % 1000)+1000);
            game[SIZE-1].setName(NAMELIST[rand()%5]);
        }
        
        SIZE++;
        }
Topic archived. No new replies allowed.