Main.cc: In function ‘int main()’:
Main.cc:8:13: error: conflicting declaration ‘bool b [n]’
bool b[n]={true};
^
Main.cc:7:11: note: previous declaration as ‘int b’
int a,b,s=0;
^
Main.cc:11:36: error: invalid types ‘int[int]’ for array subscript
for(int j=a;j<=b;++j) b[j-1]=false;
^
Main.cc:14:15: error: invalid types ‘int[int]’ for array subscript
if(b[i]==true) ++s;
^