|
From: Eric R. <eri...@cl...> - 2006-05-27 20:24:29
|
why is this always in HTML when plain text will do just as good
----- Original Message -----=20
From: Erik Schmidt=20
To: dev...@li...=20
Sent: Sunday, May 28, 2006 4:33 AM
Subject: [Dev-C++] endless loop
can someone explain to me why this loop is infinite?
for(int i=3Deq_unsplit.find("=3D");i<eq_unsplit.length();i++){
if(eq_unsplit[i]=3D=3D'x' || eq_unsplit[i]=3D=3D'y' || =
eq_unsplit[i]=3D=3D'z'){
//returns the location before i of any character that is not a number
prev=3Dprevious_non_numeric_location(eq_unsplit,i);
half[0]=3Dhalf[0]+"-"+eq_unsplit.substr(prev+1,i);
half[1]=3Deq_unsplit.substr(i,eq_unsplit.length())+"-0";
eq_unsplit=3Dhalf[0]+half[1];
}
}
prev=3Dint
eq_unsplit=3Dstring
half[0] and half[1]=3D string[2]
everything else should be self explanitory |