Hello! What methods can be used for sequential reading of characters from a string starting from a certain position. Let the vector contain the following path strings:
data / 2016 / E24G_2016037
data / 2013 / E30G_20130715
data / 2012 / E36G_20120311
data / 2011 / 15G_20111203
How can one read two-digit numbers from them, namely 24, 30, 36 and 15 for further writing to the array? Because each line contains the same symbol "G", near the values of interest, I was only able to search for its position. Any suggestions would be extremely helpful!
Example:
std::vector<string>mydata; void myClass::getNums() { int pos; char nums[32]; for(int i=0; i<(int)mydata.size(); ++i) { pos=mydata[i].rfind("G"); } }