I want to create an array of Bitset .Binary Bitset(example "100","1010",etc) After that I want to input from user and store in the the Bitset . I have tried the following line but it says error.
#include<bits/stdc++>
using namespace std;
int main()
{
int n,i;
string bit_string;
cin>>n // size of Bitset array.
bitset<8> brr[n];//
for(i=0;i<n;i++)
{
cin>>bit_string;
brr[i](bit_string);
}
return 0;
}
I want to create n Bitset each of size 8 bits.Where n is given by user. my input is binary string like. "110010","001110" please help