I have to parse string in C++ to get doubles out of it. String is in format like [(a,b)-(c,d)], where a, b, c and d are going to be double variables.
I was trying to use stringstrem, but it doesn't accept const char argument, so I have no idea right now how to solve it.
My code right now looks like:
ss >> "[(" >> a >> "," >> b >> ")-(" >> c >> "," >> d >> ")]";
But sadly it doesnt work :(
For example: [(1.2,3.4)-(6.5,7.4)]. And I want:
a=1.2; b=3.4; c=6.5; d=7.4;