i don't get what the problem is...?
if you want to read some numbers (endless loop) from the input, you can do sth like this:
int x;
while(cin>>x)
{
//doing something with number
}
for example you have some numbers in input (you don't know how many) and the output is the sum of them
then you write sth like this:
int x,sum=0;
while(cin>>x)
{
sum+=x;
}
cout<<sum<<endl;
so... example with numbers:
input : 2 6 33 67 12 54
output: 174
=====================
I don't get it why you need to write string to values array or whatever...
if you want to write values into integer array, (let's say there won't be more than 100 values) then you can just:
int x, array[100];
int i=0;
while(cin>>x)
{
array[i]=x;
i++;
if(i==100) break;
}