I have the following code so far
Code:
# include <iostream>
# include <string>
# define MAXSIZE = 300
using namespace std;
bool findTitlePrice(string allTitles[MAXSIZE], double allPrices[MAXSIZE],
int totalRec, string title, double & price);
int main () ;
{
findTitlePrice(string allTitles[MAXSIZE], double allPrices[MAXSIZE], int totalRec, string title, double & price);
int totalRec =2;
for(int i=0;i<totalRec;i++);
string Title;
cin >> Title >>allTitles [MAXSIZE};{
if (Title == allTitles[MAXSIZE]);
cout << allprices [MAXSIZE];
return true;
else
return false;
}{
system ("pause");
}
Now there are alot of errors in this program basically though i want to cin a value which is a string to match the alltitles array then check the value against the array if for example elemnt 3 in the allTitles array matches then cout element 3 in the all prices array
and return value true else if the cin title does not match anything return false
i know for sure the if title == statement does nothing just a placeholder for me so ignore this.
Any help on this would be greatly appreciated
any further questions feel free to post and i will accommodate you with answers if i can