I have some string data in the following format: "Ronit","abc""defgh","abcdef,"fdfd",
Can somebody suggest some good code in C++ to return the comma-separated tokens, when the commas are not inside a string?
I.e. it should return
- "Ronit"
- "abc""defgh"
- "abcdef,"fdfd"
to be more clear
Thanks all of you for kind help.
Below is my sample file which is given as input,
First line will tell me how many columns i have #
Name1,Name2,Name3,Name4
"user1","user,user2","user3", "userrr
rrr4",
"user1","user2","user3","us
er4",
"user1","user,2","user3","user4"
"","user2,"", "", #
Below is an output of csv file, please give me compile code, so that i can test, thanks again for your kind help.
1st Row, 1)user1, 2)user,user2 3)user3 4)userrrr4
Note rr4 is in next line.
2nd Row, 1)user1 2)user2 3)user3 4)us er4
note er4 is in next line.
3rd row, 1)user1 2)user,2 3)user3 4)user4
4thr row 1) 2) user2 3) 4)