String to Array

I am reading a file which has values separated by commas. In my program the file starts out as a string but I need it to be an array. What is an efficient way to turn the string into an array separated by the commas.
While you can read from the file, use getline to get everything until a comma (,).

http://www.cplusplus.com/reference/string/getline/
Topic archived. No new replies allowed.