Hi I'd like express this into c++ vector< bitset<8>> s{ s1, s2,..., sn }; n is the number of the element in the file. So, I made cnt to count the elements in the file. So, I made this code. But I think my code is not right. But I don't know how to fix this.
int cnt;
for (int x = 0; x < sizeof(files) / sizeof(files[0]); x++) {
std::ifstream f;
f.open(files[x].c_str(), std::ios::in);
if (f.good()) {
while (!f.eof()) {//end of file check
f >> str;
bitset<8> s(str);
cnt++;
str.clear();
}
f.close();
}
for (int i = 0; i < cnt; i++){
vector<bitset<8>> s{ s[i] };
}
}