Code:
string numberstr = "0155/194123"; int maxruns = 0; int indexint = 0; while (numberstr.find_first_not_of("0123456789",0) >= 0 && numberstr.find_first_not_of("0123456789",0) != string::npos && maxruns < 10) { indexint = numberstr.find_first_not_of("0123456789",0); numberstr.erase(indexint,1); maxruns++; }
Wenn ich das ganze als If-Abfrage formuliere, führt das Programm alles ganz normal aus. Ich bin komplett am verzweifeln und kurz davor meinen PC in Brand zu stecken, also bitte helft mir!
Grüße
Pat
EDIT:
Problem gelöst. Trotzdem danke für die Hilfe, kann geschlossen werden. :D