This is one of the two programs i have to sort out today
void displayRecord(string title, string allTitles[],
double allPrices[], int totalRec)

This function will search the first totalRec elements of the array allTitles to see if any book
title there matches the given title (through the use of above findTitlePrice function). If a
match is found, i.e. function findTitlePrice returns the value true, then display both the book
title and the corresponding price. Otherwise, display an appropriate not-found message.

Here is the code i have for the previous function Find Title Price

      # include <iostream>

      # include <string>
      const int MAXSIZE = 300;
      using namespace std;
      bool findTitlePrice(string allTitles[MAXSIZE], double allPrices[MAXSIZE], int totalRec, string title, double price); //the names of the parameters are optional
      string allTitles[MAXSIZE] ={
      "Book 1",

      "Book 2"
      double allPrices[MAXSIZE] = {

      78.5, 66.0 };

      //in the prototype
      int main()

      string title;

      double price;
      int totalRec =2;
      bool findTitlePrice(string allTitles[2], double allPrices[2], int totalRec,

      string title, double price)
 getline (cin,title);
      for (int i=0;i<2;i++) {

      if (title==allTitles[i])
      cout << " Book Found";

      cout <<" Here is The Title of the Book" << allTitles [i];

      cout << " Here is The Price Of the Matched Book" <<allPrices [i];

      return true;


cout << " Book Not Avaliable";

      return false;

      cin.get ();


Unfortunately this is not getting the price in and i need to use the voiddisplayrecord to display the result of the previous function

any help on this would be greatly appreciated