Can someone explain to me how to cout an empty set from this code? I know that the second idx should reference the array but don't know how to do it.
main.cpp
Code:
int main()
{
IntegerSet a;
cout << "Empty Set" << endl;
a.printSet();
getch();
}
IntegerSet.cpp
Code:
void IntegerSet::printSet()
{
for( int idx = 1; idx <= arraySize; ++idx )
cout << idx << ")" << setw( 3 ) << idx << endl;
}
IntegerSet.h
Code:
#ifndef INTEGERSET_H
#define INTEGERSET_H
const int arraySize = 100;
class IntegerSet
{
public:
void printSet();
private:
int array;
};
#endif