D
Dekker
Hi
I would like to transform the result of a csv-string (eg.:
"name,age\nstring,int\nMac,23\nMax,24\nMike,78") into a map of vectors
map<string, vector<???> >.
The key of the map will be the fieldname (name or age) and the values
are stored as vectors in the indicated type (string, int). Like this i
can call: result["name"][0] (= a string "Mac") or result["age"][0] (=
an int of val 23)
The problem I have: I would like to store the age as int the name as
string. How can I define a map with varying vectors?
Minor problem: Does the STL have a tokeninzing/splitting utiltiy for
strings?
Thanks in advance,
Marco
I would like to transform the result of a csv-string (eg.:
"name,age\nstring,int\nMac,23\nMax,24\nMike,78") into a map of vectors
map<string, vector<???> >.
The key of the map will be the fieldname (name or age) and the values
are stored as vectors in the indicated type (string, int). Like this i
can call: result["name"][0] (= a string "Mac") or result["age"][0] (=
an int of val 23)
The problem I have: I would like to store the age as int the name as
string. How can I define a map with varying vectors?
Minor problem: Does the STL have a tokeninzing/splitting utiltiy for
strings?
Thanks in advance,
Marco