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.
That code gives me this error: no match for 'operator[]' in 'tempSet[i]'
What am I doing wrong? Thanks for any help in advance.
Code:
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[i]'
What am I doing wrong? Thanks for any help in advance.
Comment