Я думаю, что есть какой-то тривиальный очень глупый баг, но я не могу его прибить. Любой совет?
string stuff = "5x^9";
istringstream sss(stuff);
double coeff;
char x, sym;
int degree;
sss >> coeff >> x >> sym >> degree;
cout << "the coeff " << coeff << endl;
cout << "the x " << x << endl;
cout << "the ^ thingy " << sym << endl;
cout << "the exponent " << degree << endl;
Выход:
the coeff 0
the x
the ^ thingy
the exponent 1497139744
Так и должно быть, я полагаю
the coeff 5
the x x
the ^ thingy ^
the exponent 9
x
наz
, его можно будет проанализировать. - person Bob__   schedule 27.03.2018