I'm trying to have a getData function transfer all the objects it is holding in its array to a new array so that the new array can be used in a friend function to print the objects' information.
void Set::getData(Set& tempSet) const
{
for (int i = 0; i < size; i++)
tempSet[i] = set[i];
}
That code gives me this error: no match for 'operator[]' in 'tempSet'
What am I doing wrong? Thanks for any help in advance.