I am currently working on a project involving set calculations. I am using the functions set_union and set_intersection to calculate the union and intersection of sets. My variables are:
int AunionB[8];
int AunionC[7]; // define AunionC
int BunionD[9]; // define BunionD
int AintersectB[4]; // define AintersectB
int AintersectC[3]; // define AintersectC
set<int> finalUnion; // final union of A, B, C, D
set<int> finalIntersection; // final intersection of A, B, C, D
These are the unions and intersections, respectively, of four sets: setA, setB, setC, and setD. My set_union function is as follows:
set_union(AunionC, AunionC+7, BunionD, BunionD+9, finalUnion.begin());
And my set_intersection function is as follows:
set_intersection(AintersectB, AintersectB+4, AintersectC,
AintersectC+3, finalIntersection.begin());
When I compile, I get the error "Required from here", the meaning of which I am not sure of. Can someone please help me with this? I believe it is something to do with the set_union and set_intersection functions and their parameters, but I'm not sure.