I try to read data from a text file. The .get function of the istream reads a 5 in the txt-File but returns the corresponding ascii dec value which is 53. I want to convert that value to 5.
One line of the text file is formatted like that:
Format: [Text] = [Value]
Ex.: Config Value = 5
.
The code that is reading from the text file is:
tmpTxt.ignore(100, '='); //skips past the =
tmpTxt.ignore(100, ' '); //skips past the space
ConfigVec.push_back(tmpTxt.get()); //reads value and pushes it back to the vector(I want this value to be 5)