Hey,
Im new to programming (less than 3 months into a course) and we have a assignment (no im not asking you guys to do it for me) and iv written the below code but i keep getting this error
C2664: 'input' : cannot convert parameter 1 from 'int' to 'int []'
Sorry if i look like i have made a mess of the code most likely its all wrong but im new to coding and im finding it hard to wrap my hear around.
Thanks in advance kv0nza
Code:#include <iostream> #include <iomanip> using namespace std; int input (int qtyStock[], int stockPrice[], int k) { cin >> qtyStock[6]; cin >> stockPrice[6]; } void heading () { cout << "-------------------------------------------------------------------------" << endl; cout << "Stock Item" << setw(15) << "Quantity" << setw(10) << "Unit Price" << setw(15) << "Total Value" << endl; } int outputGross(int &gross) { } int computation (int qtyStock[], int stockPrice[], int stockValue[]) { } int output (int qtyStock[], int stockPrice[], int stockValue[], int gross, int m) { } int main() { int qtyStock[6] = {0,0,0,0,0,0}; int stockPrice[6] = {0,0,0,0,0,0}; int stockValue[6] = {0,0,0,0,0,0}; int k; int gross; for (int k = 0; k < 6; k++) { input(qtyStock[k], stockPrice[k], k); gross += computation(qtyStock[k], stockPrice[k], stockValue[k]); } heading(); for (int m = 0; m < 6; m++) { output(qtyStock[m], stockPrice[m], stockValue[m], gross, m); } outputGross(gross); system("pause"); return 0; }



LinkBack URL
About LinkBacks
) and iv written the below code but i keep getting this error 




