#include <fstream>
using std::ifstream;
#include <vector>
using std::vector;
#include <string>
using std::string;
int main()
{
ifstream fileIn( "C:\\myfile.txt" );
string buf;
vector<string> myArray;
while ( fileIn.eof() == false )
{
fileIn.get( buf, ',' );
myArray.push_back( buf );
}
fileIn.close();
// Now do something with the array...
return 0;
}