Hey folks, using this sunny Saturday to crack on with some college work. Need to pass a 2d array to a function in a seperate file. Here's the code I have so far (please don't go picking faults with code, this is how I'm being taught )
From the main.cpp file
This is menu 1:
cout<<"1. The total number and value of computers sold for any given product\n";
cout<<"2. The total number and value of computers sold for any given month\n";
cout<<"3. The maximum number and value of computers sold for any given product\n";
cout<<"4. The maximum number and value of computers sold for any given month\n\n";
cout<<"Please select a menu option: ";
menu1(iAmounts); //This is the bit where it (trys) to send it to menu1
Cheers guys - if I haven't been clear please ask what you need to know.
void menu1(int iAmounts) //If I put a 5 & 6 in these boxes it works, but I don't want to do that in case there are more than 5 & 6 in the array because then I'd have to change that in more than 1 place. How do I stipulate the size automatically?
cout<<iAmounts; //This is just a test print to see if it works.