I have been playing around with sscanf but I have recently read that it does not even support floats and doubles. true?
doesnt save anything into c1, c2Code:double c1,c2; string input = "guaranteed repair & support at (3.124, 391.111)."; sscanf(input.c_str(),"%lf%lf%",&c1,&c2);
doesnt change anythingCode:double c1,c2; string input = "guaranteed repair & support at (3.124, 391.111)."; sscanf(input.c_str(),"%*s%lf, %lf%).",&input, &c1,&c2);
anyone know a way to pull the doubles out of the string and save them in c1 and c2?
(without explicitly iterating through the string and finding the (...) )
THanks



LinkBack URL
About LinkBacks


