name & line are string type;
age is int type.
when i debug, msvc told me assign is a function for string only. how can i do the same job for int type?
age is int type.
Code:
size_t found_2=line.find("\s", found_1);
name.assign(line,found_1,found_2);
size_t found_3=line.find("\s", found_2);
age.assign(line,found_2,found_3);
Comment