|
From: Erik S. <esc...@gm...> - 2006-05-27 16:33:38
|
can someone explain to me why this loop is infinite?
for(int i=eq_unsplit.find("=");i<eq_unsplit.length();i++){
if(eq_unsplit[i]=='x' || eq_unsplit[i]=='y' || eq_unsplit[i]=='z'){
//returns the location before i of any character that is not a number
prev=previous_non_numeric_location(eq_unsplit,i);
half[0]=half[0]+"-"+eq_unsplit.substr(prev+1,i);
half[1]=eq_unsplit.substr(i,eq_unsplit.length())+"-0";
eq_unsplit=half[0]+half[1];
}
}
prev=int
eq_unsplit=string
half[0] and half[1]= string[2]
everything else should be self explanitory |