i have a vector of set and i want to do compare to get intersection of all these sets
#include<iostream>
#include<set>
#include<vector>
#include <algorithm>
#include <string>
using namespace std;
int main() {
vector<set<string>>data;
string courses;
int students = 0, numberOfCourses = 0;
cin >> students;
for (int i = 0; i < students; i++) {
cin >> numberOfCourses;
set<string>st;
for (int j = 0; j < numberOfCourses; j++) {
cin >> courses;
st.insert(courses);
}
data.push_back(st);
}
}
i searched but all answers about comparing two different vectors i want to compare same vector