#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int t;
cin >> t;
char g;
vector<int> b(t);
vector<int> c(t);
for(int a=0; a<t ; a++)
{
cin>>b[a]>>g>>c[t];
//this g was not required as a space as input is to be given
}
for(int a=0; a<t ; a++)
{
float z,x;
int q,w,c,v,ans=0;
z=sqrt(b[a]);
x=sqrt(c[a]);
//here the line above error is coming`enter code here`
c=ceil(z);
v=ceil(x);
q=z;
w=x;
if((c==v)&&(v!=w))
{
ans=0;
}
else if((c==v)&&(v==w))
{
ans=1;
}
else
{
while(c<=v)
{
ans++;
c++;
}
}
cout<<ans<<endl;
}
return 0;
}`
I know this error but i dot understand why it is coming in this code... please help...
I am not declaring 1 dimensional array and using like a 2 dimensional array so that i m getting this error...please help the error I m getting is
invalid types 'int[int]' for array subscript
c. This will mask out the original vectorc.