long trash; // Used to ignore the first entry.
char comma; // Used to retrieve and discard that pesky comma.
size_t i = 0;
const size_t Array_size = 100;
long array[Array_size];
while( i < Array_size && cin >> trash >> comma >> value[i++])
{ /* Blank body */ }
There are many many different ways of accomplishing your objectives. I suggest you Google "C++ file input and output" and start reading.