Extract fields from a character array in c++?
Suppose if I have a character array in the following format
2|310456|Acton Golden|Advertising|P3|Hyderabad
i.e
char text[]="2|65412|Harry Wilkins|Developer|Paris"
I have a 2D array of type char
How can I extract each column from that particular line and store in this character array? I want to store
data[0]="2"
data[1]="65412"
data[2]="Harry Wilkins"
data[3]="Developer"
data[4]="Paris"
Please help
Topic archived. No new replies allowed.