I want my function "ordenafile" to take candidatos.000 - candidatos.068. For some reason si[0] is bugged i think, cause if I make the program prints si[0], it crashes. Anyone knows why?
int i;
char si[1],si2[2],sname[20]="candidatos.00",sname2[20]="candidatos.0";
for(i=0;i<=68;i++){
if (i<=9){
itoa(i,si,10);
sname[12]=si[0];
ordenafile(sname);
}
itoa(i,si2,10);
sname2[12]=si2[0];
sname[13]=si2[1];
ordenafile(sname);
}