I have to take two arrays, put them in a function, and then put them into a file. I have no problem actually making the arrays, but I am not quite sure how to go about defining the function for both arrays.
I appreciate any help!
#include "stdafx.h"
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
void ShowData(string[], double[][4], const int[]);
const int SIZE = 6;
const int NUM_ROWS=6;
const int NUM_COLS=4;
int main()
string companies[SIZE] = {"SDF","VXC","CCL","REL","MPL","GHB"};
double sales [NUM_ROWS] [NUM_COLS] =
{{10000, 70000, 60000, 80000},
{35000, 55000, 34000, 60000},
{35000, 46000, 17000, 29000},
{29000, 30000, 31000, 38000},
{42000, 44000, 46000, 45000},
{20000, 23000, 35000, 43000}};
ofstream outFile;
outFile.open("c:\\temp\\data.txt");
outFile << writeData(companies,sales);
outFile.close();
system("pause");
return 0;
}