Hi there,
i need to know how to access my elements in a set of integers.
i have private data for the following:
private:
vector <bool> setlist; // indicates set elements as true
int cardinality; // number of items in set
im creating a function that 'dumps' the elements of the set out to the screen, but atm im only dumping out binary numbers.
understandbly since the its a bool type.
given that this is the private data how can i access the elements instead of the actual bool values.
i currently have a code as such :
for (int i =0; i < setlist.size(); i++){
cout << setlist.at(i) ;
}
regards