When i try to read this line from a file ->
And try to extract the 3 float values from the string, i get the following output:
Which you can see works fine, until it reaches the last float value.
This can be tested using the following function:
usemtl 0.298_0.802__0.800
And try to extract the 3 float values from the string, i get the following output:
0.298 0.802 -1.07374e+008
Which you can see works fine, until it reaches the last float value.
This can be tested using the following function:
void foo(){
std::istringstream instream;
string s = "usemtl 0.298_0.802__0.800";
float f1,f2,f3;
instream.str(s);
string trash = "usemtl";
char c = '_';
instream >> trash >> f1 >> c >> f2 >> c >> f3;
cout << f1 << " " << f2 << " " << f3 << endl;
instream.clear();
}