#include #include using namespace std; const size_t MAX_SIZE = 10; void LoadArray(string ary[], size_t & size, size_t MAX, string fileName, string destName); void PrintArray(const string ary[], size_t size); int main() { string names[MAX_SIZE]; size_t nameSize; LoadArray(names, nameSize, MAX_SIZE, "file2","A"); cout << "The array has " << nameSize << " elements." << endl; PrintArray(names, nameSize); return 0; } void PrintArray(const string ary[], size_t size) { size_t i; for(i=0;i> tmp; while(inFile and size < MAX) { ary[size] = tmp; size++; inFile >> tmp; } if (inFile) { cout << "Load resulted in overflow, " << destName <<" truncated."<< endl; } } return; }