Command: Function accept parameters - NOW!

// How does one modifiy the lookUpBook function to accept a book title as an
// incoming parameter?
// I know it is 4:45 AM,
// but C++ is fun, and hard at the same time.
// And I think the C++ reading combined with the rich LCD colors on my
// flat panel are starting to
// mess with my eyes, even though I am wearing glasses.
// - I need a break -

#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
using namespace std;

void lookUpBook(); // Function Protoype
//Looks up a book within the inventory database


const int SIZE = 20; // Global Parallel Array Declarator
char bookTitle[SIZE]; // bookTitle Array

int main()
{

//Omitted for Brevity.

}
void lookUpBook()
{
cout <<"\t\t\tYou selected Look Up Book.";
}


well.....
1
2
3
4
5
6
void lookUpBook(char bookname[])
{
        cout<<"\t\t\tYou selected Look Up Book.";
        //add code here to use the bookname
}
the call is:lookUpBook(/*name of book here*/);

hope this is what you wanted to know
Last edited on
Thank you Nandor, I have been up all night C++'ing, and I think its time for me to catch a couple hours of sleep.

Topic archived. No new replies allowed.