02/09/12 16:20
Saik
Salve a tutti.
La seguente funzione mi da diversi problemi in quanto non restituisce il controllo a main, compilo in Visual c++ 2010
Grazie a tutti. Sono disperato
La seguente funzione mi da diversi problemi in quanto non restituisce il controllo a main, compilo in Visual c++ 2010
Grazie a tutti. Sono disperato
string expc::converter() { stack<char> temp; string result; string esp = post; int count = 0; char current = esp[count]; temp.push('('); esp += ')'; while(temp.isStackEmpty() == false) { count++; current = esp[count]; if(isOperator(current)) { char corrente = current; char carattere = temp.pop(); while(carattere > corrente) { result += carattere; carattere = temp.pop(); } temp.push(carattere); temp.push(current); }else { if(current == '(') { temp.push(current); }else{ if(current == ')') { char carattere = temp.pop(); while(carattere != '(') { result += carattere; carattere = temp.pop(); } }else { result += current; } } } } return result; }
aaa