mardi 31 octobre 2017

Error C++ can fix it

void displayPhone(string* productID, vector& price, int qoh, int& numberofPhones);

void displayPhone(string* productID, vector& price, int qoh, int& numberofPhones,string ID) { int index = findID(productID, numberofPhones, ID); cout << "Product ID: " << *(productID + index) << " Price: "<< price[index] << " Quanity: "<< (qoh + index) << endl; }

keep getting this error : no matching function for call to 'displayPhone' displayPhone(productID,price,qoh,numberofPhones); ^~~~~~~~~~~~ note: candidate function not viable: no known conversion from 'int *' to 'int' for 3rd argument; dereference the argument with * void displayPhone(string* productID, vector& price, int qoh, int& numberofPhones); ^

Aucun commentaire:

Enregistrer un commentaire