Hello Im trying to send these text intergers into my array
the Numbers are: 9 -3 45 -90 400 -20 -123 -67 98.
I am having alot of difficulty trying to do this. this is the code I have right now. I just cannot think of a way on how to read the numbers from the text file. I think I need to use a for loop but, how should I do it?
for(int i = 0; i < /*number of characters here*/; i++){
infile >> mynumbers[i];
}
this will not include white space. and could i suggest integers to use if you are only using numbers. making it a char array will make it harder to manipulate the numbers.