Code:
void RastiZodiDiag(string & zod, int & kiek, Raides & R, int b,int a,int c, int stulp){
string zodis,ZodisD1,ZodisD2;
int zpab = ceil((double)KiekVietos(Df1)/2)+1;
int stulpe = R.ImtiStulpelius()/2;
//int stulp= R.ImtiStulpelius()/2;
for (int i = a; i < zpab; i++){
if (a!=stulpe+1){
i=a;
for (int j = a+1; j < stulp+1; j++)
{
zodis = R.ImtiRaide(i,j);
ZodisD1+= zodis;
//zodis = R.ImtiRaide(j,i);
//ZodisD2+= zodis;
i++;
}
cout<<ZodisD1<<endl;
if(ZodisD1 == zod || ZodisD2 == zod){
kiek++;
}
ZodisD1="";
ZodisD2="";
/*if(zpab!=R.ImtiEilutes()){
zpab++;
}*/
a++;
i = a;
zpab++;
stulp++;
}
}
c++;
if(b!=stulp){
a=0;
b=c;
RastiZodiDiag(zod,kiek,R,a,b,c,stulp);
}
}
I have written this much, but this only searches for the upper right diagonal from the main diagonal, somehow i need to jump in to another diagonal to right from one i have cherked.