Infinite loop while executing

I’m confused about when to use long long and just int while declaring.
this is the code.

#include
#include

#define ll long long

using namespace std;

void sieve(vector &s)
{
s[2]=1;
for(int i=3;i<10000000;i=+2)
{
s[i]=1;
}

for(ll i=3;i<10000000;i+=2)
{
	for(ll j=i*i;j<10000000;j+=i)
	{
		s[j]=0;
	}
}

}

vector findprimes(vector &s)
{

vector<int>primes;
for(int i=0;i<s.size();i++)
{
	if(s[i])
	{
		primes.push_back(i);
	}
}
return primes;

}

int main()
{
vectors(10000000,0);
vectorprimes;

sieve(s);
primes=findprimes(s);

ll n;
cin>>n;

if(n<10000000)
{
	return s[n];
}
else
{
	for(ll i=0; i<primes.size() && (ll)primes[i]*primes[i]<=n;i++)
	{
		if((n%primes[i]) == 0)
		{
			return 0;
		}
	}
	return 1;
}

}

Hello @bhadra28 please share your code by saving it on ide.codingblocks.com .

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.