arrays in classes

I have to build a class that stores an array of fractions (a previous class that I built). I already built my fraction class and this class i am building is called FList.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FList::FList()              
{
    currentSize = 0;
}

bool FList::Insert(Fraction f1)
{
    if(currentSize < MAXSIZE)
    {
        newList[currentSize] = f1;
        currentSize++;
        return true;
    }
    else
        return false;
}

my private variables are
1
2
int currentSize;
Fraction newList[MAXSIZE]; //where MAXSIZE is a const. 

It keeps throwing me compiler errors and I am not sure how to fix it. I just need my array to be able to hold the Fraction objects that are passed in. I am struggling on this very badly. If anyone could help that would be great!
Last edited on
It keeps throwing me compiler errors
Which errors?
Topic archived. No new replies allowed.