how to read in a comma separated .text file and store them in an array in c++ code example
Example: read comma separated text file in c++
#include <iostream>
#include <fstream>
#include <string>
ifstream file("filename.txt");
string data = "";
while(getline(file, data,','))
{
cout << data << endl;
}
file.close();