c++ - Dividing formatted string into smaller strings -
i store list of students in text file. every student's primary data stored in 1 line , list of classes second line, classes separated ','
. goes mathematics,linear algebra,physical education adv, optics,
. if read 1 string, how can divide it, temp1 mathematics, temp2 linear algera , on...?
use strtok function - use page reference http://www.cplusplus.com/reference/cstring/strtok/
though might difficult use @ first, it's quite efficient
Comments
Post a Comment