I have a string from command line input, like this:
string input = cmd_line.get_arg("-i"); // Filepath for offline mode
This looks like a file as below:
input = "../../dataPosition180.csv"
I want to extract out the 180
and store as an int
.
In python, I would just do:
data = int(input.split('Position')[-1].split('.csv')[0])
How do I replicate this in C++?