I am trying to compare two integer vectors. The first loop in the program is executing but the second and the third loop is not executing.
vector<int> a,b;
int range=0;
cout<<"Enter 1st vector."<<endl;
for(int n=0;cin>>n;)
{
a.push_back(n);
}
cout<<"Enter 2nd vector."<<endl;
for(int n=0;cin>>n;)
{
b.push_back(n);
}
if(a.size()>b.size())
range=b.size();
else
range=a.size();
cout<<"\nThird loop."<<endl;
for(int i=0;i<range;i++)
{
if(a[i]!=b[i])
goto here;
}
cout<<"\nSame vectors."<<endl;
return 0;