Hey everyone! I need to make a project for my CIS class and I was wondering if anyone could help me by giving me a snippet of code or so or some example of how to read a files data into an array. I am pretty familiar with f stream, and with arrays as well. I just can't figure out how to connect the too...an example of what I mean:
External file.txt containing numbers:
1, 2, 3, 4, 5
1 2 3 4 5 6 7
int myArray[5];
//Code to input file elements into array.
cout <<