Programowanie C++

Mam problem w zaznaczonych na samym końcu linijkch (warunek z if-em) wyświetla mi błąd
" ‘else’ without a previous ‘if’ " i po prostu nie wiem o co chodzi i czemu nie działa??

W programie chodzi o policzenie w tablicy liczb parzystych i nieparzystych oraz wyświetlenie ich ilości na ekranie .

#include

using namespace std;

bool palindrom(string liczba)

{
bool test=1;
for(int i=0;i<liczba.size()/2;i++)
if (liczba[i]!=liczba[liczba.size()-1-i])
{
test=0;
break;
}
return test;
}
string babelek(string licz)
{
int tmp;
for(int i=0;i<licz.size();i++)
{
for(int j=0;j<licz.size()-1;j++)
{
if(licz[j]>licz[j+1])
{
tmp=licz[j];
licz[j]=licz[j+1];
licz[j+1]=tmp;
}
}
}
return licz;
}

int main()
{
string liczby[500]={“180055”,“146”,“96269”,“49157”,“565464”,“115357”,“5656”,“1427”,“410940”,“5041”,“11530”,“1300”,
“44”,“548”,“80487”,“1736”,“594024”,“10333”,“978804”,“25203”,“964167”,“68201”,“25105”,“5457”,
“809875”,“345”,“222”,“11611”,“2455”,“179842”,“44891”,“194872”,“15435”,“9871”,“349”,“2197”,“2586”,
“263057”,“54456”,“90415”,“10450”,“2584”,“45641”,“18273”,“32147”,“78963”,“34775”,“11406”,“12892”,
“16”,“32654”,“3786”,“78451”,“31245”,“5969”,“77886”,“8305”,“707024”,“1150511”,“78744”,“464”,
“1189”,“5466”,“226425”,“1369”,“32041”,“47979”,“3653”,“543366”,“789399”,“42417”,“88”,“34337”,
“61067”,“60823”,“461933”,“194229”,“88865”,“424347”,“8899”,“606”,“962212”,“32589”,“256”,“81074”,
“98003”,“1686”,“448933”,“60707”,“497”,“978457”,“54799”,“4253”,“35225”,“217”,“2367”,“58730”,
“856”,“549105”,“90807”,“4789”,“98439”,“12058”,“109671”,“14482”,“1331”,“610842”,“79893”,“3230”,
“8963698”,“7992”,“442”,“21854”,“55987”,“79442”,“328120”,“16686”,“775183”,“568674”,“261712”,
“761”,“35393”,“555835”,“474”,“729”,“57475”,“496993”,“4748”,“282076”,“467384”,“22489”,“868149”,
“81301”,“815”,“22370”,“558996”,“973143”,“844561”,“37230”,“26245”,“100001”,“21028”,“474417”,
“725902”,“11110”,“46463”,“46464”,“1638”,“376960”,“116124”,“56464”,“46466”,“769613”,“1062”,
“82600628”,“8910”,“2670”,“458863”,“7294”,“515590”,“153148”,“729368”,“736349”,“270591”,
“237665”,“80331”,“416464”,“216479”,“4”,“545”,“4646”,“54879”,“14913”,“58933”,“3694”,“74299”,
“1350”,“63403”,“748470”,“1838”,“155893”,“3790”,“45666”,“298892”,“86669”,“96721”,“842468”,
“34154”,“556”,“80201”,“489”,“93801”,“75228”,“53850”,“66988”,“111”,“4548”,“45455”,“95140”,
“88996”,“153106”,“445”,“38285”,“287”,“54464”,“1245”,“783”,“58807”,“157”,“45454”,“119”,“414881”,
“644666”,“10782”,“8402”,“13300”,“173319”,“10791”,“19”,“874”,“13”,“693”,“8018”,“12”,“1121”,“588”,
“254”,“789312”,“136873”,“93094”,“55878”,“574”,“5123”,“17220”,“44478”,“9”,“942841”,“350473”,
“830536”,“1111”,“518639”,“30534”,“7133”,“94025”,“305”,“185408”,“2067”,“101”,“1997”,“163563”,
“79”,“49”,“8337”,“8921”,“492423”,“159358”,“820692”,“566”,“631355”,“5224”,“772369”,“5558”,“55”,
“67459”,“107”,“6847”,“701”,“103667”,“1690”,“95099”,“252792”,“266970”,“56324”,“37”,“10230”,“902698”,
“236334”,“358503”,“7150”,“890511”,“54584”,“21365”,“84929”,“269693”,“970”,“59704”,“93103”,“786793”,
“603984”,“66147”,“4022”,“79288”,“619113”,“13030”,“930306”,“63450”,“358899”,“2271”,“687”,“67277”,
“3763”,“97621”,“630112”,“458717”,“8418”,“50525”,“2611”,“21228”,“884378”,“4018”,“9610”,“1849”,“54247”,
“120994”,“302100”,“984661”,“153535”,“37268”,“86095”,“7662”,“5”,“50385”,“1118”,“110787”,“142523”,
“325622”,“724847”,“110”,“880670”,“474243”,“77474”,“77”,“6480”,“554041”,“50497”,“221”,“136”,
“689986”,“95180”,“336”,“560041”,“9290”,“8208”,“6738”,“46199”,“256189”,“97042”,“6517”,
“2855”,“150950”,“896724”,“511489”,“33808”,“9984”,“9069”,“114”,“5786”,“838”,“8219”,
“139973”,“3547”,“545820”,“7762”,“1012”,“52”,“51”,“409148”,“589245”,“8409”,“26713”,
“6485”,“2077”,“34404”,“9133”,“12834”,“11557”,“856051”,“186768”,“49886”,“41343”,“22964”,
“528529”,“21562”,“43303”,“662919”,“25904”,“75684”,“83433”,“133968”,“571297”,“75462”,“9377”,
“22467”,“60590”,“46546”,“1055”,“1545”,“1281”,“69811”,“750769”,“1676”,“56079”,“187088”,“501120”,
“1000”,“7550”,“1779”,“10164”,“5556”,“14478”,“9888”,“3214”,“338”,“854265”,“852”,“29383”,“67403”,
“157358”,“652”,“623”,“218”,“82399”,“326”,“86”,“490”,“498”,“9308”,“665”,“1010”,“70”,“684118”,
“910231”,“760140”,“6”,“7416”,“6113”,“690735”,“1891”,“442854”,“910”,“6386”,“862978”,“5509”,
“607951”,“50”,“9999”,“7889”,“9629”,“121”,“961”,“783868”,“752895”,“303”,“909653”,“3595”,
“1039”,“463635”,“34282”,“46957”,“5613”,“198988”,“45”,“11709”,“8228”,“799299”,“478989”,
“84293”,“3747”,“9061”,“456”,“224465”,“2823”,“1457”,“56281”,“137”,“6546”,“672833”,“664424”,
“775”,“1186”,“399”,“488463”,“74705”,“7319”,“6187”,“136129”,“147598”,“61323”,“7067”,“2000”,
“48”,“602177”,“301”,“95848”,“65467”,“443250”,“262”,“169”,“543”,“3”};

int ile_pal=0,i;
for(i=0;i<500;i++)if(palindrom(liczby[i]))ile_pal++;
cout<<"Palindromow jest "<<ile_pal<<endl;

string tab_palindrom[35];
int j=0;
for(i=0,j=0;i<500;i++)
if(palindrom(liczby[i]))
{
tab_palindrom[j]=liczby[i];
j++;
}

cout<<"Palindromy: ";
for(int i=0;i<ile_pal;i++)
{
	cout<<tab_palindrom[i]<<" ";
}
cout<<"\n\n";

int ile_p=0;
int ile_np=0;
string liczba;

**for(int i=0;i<500;i++)**

** if(liczby[i][liczby[i].size()]-1==‘0’or’2’or’4’or’6’or’8’)**
** ile_p++;**


** cout<<“Liczb parzystych jest “<<ile_p<<”\n”;**
** cout<<endl;**


** else **
** { **
** ile_np++;**
** }**
** cout<<“Liczb nieparzystych jest “<<ile_np<<”\n”;**

instrukcji dla if przed else nie masz ograniczonych {}

#include <string>
#include <iostream>

using namespace std;

bool palindrom(string liczba)
{
	bool test = true;
	for (int i = 0; i < liczba.size() / 2; ++i)
	{
		if (liczba[i] != liczba[liczba.size() - 1 - i])
		{
			test = false;
			break;
		}
	}
	return test;
}


int main()
{
	string liczby[500] = { "180055","146","96269","49157","565464","115357","5656","1427","410940","5041","11530","1300",
	"44","548","80487","1736","594024","10333","978804","25203","964167","68201","25105","5457",
	"809875","345","222","11611","2455","179842","44891","194872","15435","9871","349","2197","2586",
	"263057","54456","90415","10450","2584","45641","18273","32147","78963","34775","11406","12892",
	"16","32654","3786","78451","31245","5969","77886","8305","707024","1150511","78744","464",
	"1189","5466","226425","1369","32041","47979","3653","543366","789399","42417","88","34337",
	"61067","60823","461933","194229","88865","424347","8899","606","962212","32589","256","81074",
	"98003","1686","448933","60707","497","978457","54799","4253","35225","217","2367","58730",
	"856","549105","90807","4789","98439","12058","109671","14482","1331","610842","79893","3230",
	"8963698","7992","442","21854","55987","79442","328120","16686","775183","568674","261712",
	"761","35393","555835","474","729","57475","496993","4748","282076","467384","22489","868149",
	"81301","815","22370","558996","973143","844561","37230","26245","100001","21028","474417",
	"725902","11110","46463","46464","1638","376960","116124","56464","46466","769613","1062",
	"82600628","8910","2670","458863","7294","515590","153148","729368","736349","270591",
	"237665","80331","416464","216479","4","545","4646","54879","14913","58933","3694","74299",
	"1350","63403","748470","1838","155893","3790","45666","298892","86669","96721","842468",
	"34154","556","80201","489","93801","75228","53850","66988","111","4548","45455","95140",
	"88996","153106","445","38285","287","54464","1245","783","58807","157","45454","119","414881",
	"644666","10782","8402","13300","173319","10791","19","874","13","693","8018","12","1121","588",
	"254","789312","136873","93094","55878","574","5123","17220","44478","9","942841","350473",
	"830536","1111","518639","30534","7133","94025","305","185408","2067","101","1997","163563",
	"79","49","8337","8921","492423","159358","820692","566","631355","5224","772369","5558","55",
	"67459","107","6847","701","103667","1690","95099","252792","266970","56324","37","10230","902698",
	"236334","358503","7150","890511","54584","21365","84929","269693","970","59704","93103","786793",
	"603984","66147","4022","79288","619113","13030","930306","63450","358899","2271","687","67277",
	"3763","97621","630112","458717","8418","50525","2611","21228","884378","4018","9610","1849","54247",
	"120994","302100","984661","153535","37268","86095","7662","5","50385","1118","110787","142523",
	"325622","724847","110","880670","474243","77474","77","6480","554041","50497","221","136",
	"689986","95180","336","560041","9290","8208","6738","46199","256189","97042","6517",
	"2855","150950","896724","511489","33808","9984","9069","114","5786","838","8219",
	"139973","3547","545820","7762","1012","52","51","409148","589245","8409","26713",
	"6485","2077","34404","9133","12834","11557","856051","186768","49886","41343","22964",
	"528529","21562","43303","662919","25904","75684","83433","133968","571297","75462","9377",
	"22467","60590","46546","1055","1545","1281","69811","750769","1676","56079","187088","501120",
	"1000","7550","1779","10164","5556","14478","9888","3214","338","854265","852","29383","67403",
	"157358","652","623","218","82399","326","86","490","498","9308","665","1010","70","684118",
	"910231","760140","6","7416","6113","690735","1891","442854","910","6386","862978","5509",
	"607951","50","9999","7889","9629","121","961","783868","752895","303","909653","3595",
	"1039","463635","34282","46957","5613","198988","45","11709","8228","799299","478989",
	"84293","3747","9061","456","224465","2823","1457","56281","137","6546","672833","664424",
	"775","1186","399","488463","74705","7319","6187","136129","147598","61323","7067","2000",
	"48","602177","301","95848","65467","443250","262","169","543","3" };

	int ile_pal = 0;
	cout << "Palindromy: ";
	for (int i = 0; i < 500; ++i) 
	{
		if (palindrom(liczby[i]))
		{
			ile_pal++;
			cout << liczby[i] << " ";
		}		
	}

	cout <<endl<<endl<< "Palindromow jest " << ile_pal << endl << endl;
	
	int ile_p = 0;

	for (int i = 0; i < 500; ++i) 
	{
		if ((stoi(liczby[i])) % 2 == 0)
			++ile_p;
	}
	cout << "Liczb parzystych jest " << ile_p << endl << endl;
	cout << "Liczb nieparzystych jest " << 500-ile_p << endl;	
}