union of two sets
as parts of that set assignmnet I have been posting for a few days now I have two have a union, intersection, and difference operations.
My professor told us we have to use bit-vector representation in order to meet the run time requirements. I'm not exactly sure what he meant by the bit-vector thing. Should I make an operator do the union for me...ie + for union, * for interection, and - for difference. Thats what I found looking around on the internet...but we have not learned anything like that in class....any suggestions?
What your professor wants you to use is probably an STL vector of bits. Because there is no bit type, you'll have to use a vector of bool instead.
I think there's a bitset class. (it's not an STL class)
There's also a vector<bool> specialization of the STL vector.
>> should I make an operator do the union for me...ie + for union, * for interection, and - for difference.
I don't think that's necessary unless your professor said that you must use operator overloading.