C
computerwolf8
I have a file where I know the lines go as follows:
string
long
string
int
int
string
double
it then repeats this sequence multiple times. I can use getline() to
get the data, but I need to be able to use the ints, doubles, and longs
without them being strings or char[]. The strings also have an unknown
amount of spaces in each one, so i can't use >> to get the data. At
least not that I can get to work. Is there a way to get the different
data into variables of the correct types? If there is a way to convert
them after I use getline() that would work too.
string
long
string
int
int
string
double
it then repeats this sequence multiple times. I can use getline() to
get the data, but I need to be able to use the ints, doubles, and longs
without them being strings or char[]. The strings also have an unknown
amount of spaces in each one, so i can't use >> to get the data. At
least not that I can get to work. Is there a way to get the different
data into variables of the correct types? If there is a way to convert
them after I use getline() that would work too.