hi guys, i need some help from u...
I need to write a function, that recieves char array and the function returns the minimmum character, then, after i ask again for an other result, it ignores the previous one.
this is what i thought will be the best way to write it, but i dont know why, it always returns me the same value...
------------------------------------------------------
struct pass {
char car[tamcla];
char ava[tamcla];
};
int valmin( pass clave, int recla){ //recla, is the previous value found. (m)
int count, m;
for (count=0; count<recla; count++){
if ((clave.car[count]< clave.car[(count+1)]) && (clave.ava[count]!='n')){
clave.ava[count]='n';
m=count;
}
}
return (m);
}
thanx for your help!!!