Assignment: for Comp Sci 1 C++
Write a function FillArray, which takes two arguments, the first is the name of a file, the second is an array of strings of size 500 with no data in it. Your function should open the file. The file will consist of strings each separated by whitespace.
Read the strings into the array until done. The return value should be the number of strings in the array. If for any reason hte function cannot open the file, it should return -1. THe function should close the file before it returns.
Use the song from Homework1 as your test data.
using namespace std;
int FillArray(string file, string large)
int main ()
cout << "Enter name of text file to open:" endl;
cin >> file;
counter = FillArray(file, large);
I have the file saved as song1. (it's the limerrick about the a queen...my professor is british.) So what should I do from here. I'm stuck