I am having major issues on my homework... I can't seem to figure out the concept and was wondering if anyone can provide a hint on how to do this. I am suppose to use a code my professor gave us to " use an array of six integers for the table parameters that were input and calculated. This means that most of the functions will have only one parameter, which is an array".
we have the program split into 5 pages. 3 source files and 2 header files. In one of the header files there is this
void outputTable(
int productColumnWidth,
int rowHeaderColumnWidth,
int columnMinimum, int columnMaximum,
int rowMinimum, int rowMaximum);
this is what it is doing
void outputTable(
int productColumnWidth,
int rowHeaderColumnWidth,
int columnMinimum, int columnMaximum,
int rowMinimum, int rowMaximum)
{
columnHeaderLine(
productColumnWidth,
rowHeaderColumnWidth,
columnMinimum, columnMaximum);
// horizontal border line
horizontalBorderLine(
productColumnWidth,
rowHeaderColumnWidth,
columnMinimum, columnMaximum);
Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.
I found the second link to be the most help.
With out seeing the rest of the program one can only guess at what to do.
The chances are good the the array can be filled at the time of input with something like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
int main()
{
constexpr size_t MAXSIZE{ 6 };
int colummnNums[MAXSIZE]{};
std::cout << "\n Enter Productcolumn width: ";
std::cin >> colummnNums[0];
std::cout << "\n Enter Row header column width: ";
std::cin >> colummnNums[1];
return 0;
}
And you would continue on with the rest of the variables putting it into the rest of the array.