#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    6
    Rep Power
    0

    Angry error C2660: 'bookinfo' : function does not take 8


    I keep getting an error that says that my bookinfo function can't take 8 arguments but that's how many I have set it up for, so any suggestions? Thx!
    ****************************************************
    Here's my source code! I'm using Visual Studio.NET
    ****************************************************

    void lookUpBook()
    {
    char title[51];

    cin.ignore();
    cout << "Please Enter Title: ";
    cin.getline(title, 51);
    _strupr(title);
    for (int row = 0; row < 21; row++)
    {
    // search for a match in the database
    if (strcmp(bookTitle[row], title) == 0) // if they match
    {
    bookinfo(isbn[row], bookTitle[row], author[row], publisher[row], dateAdded[row], qtyOnHand[row], wholesale[row], retail[row]);
    break;
    }
    else if (row == 20)
    {
    cout << "\nSorry. No title matching \'" << title << "\' was found." << "\n\n";
    }
    }
    }


    void bookinfo(char BookIsbn[], char BookBookTitle[], char BookAuthor[], char BookPublisher[], char BookDateAdded[], int BookQtyOnHand[], float BookWholesale[], float BookRetail[])
    {
    cout << BookIsbn;
    cout << " Serendipity Booksellers\n";
    cout << " Book Information \n\n";
    cout << " Title: " << BookBookTitle;
    cout << " Author: " << BookAuthor;
    cout << " Publisher: " << BookPublisher;
    cout << " Date Added: " << BookDateAdded;
    cout << " Quantity-On-Hand: " << BookQtyOnHand;
    cout << " Wholesale Cost: " << BookWholesale;
    cout << " Retail Cost: " << BookRetail;
    }
  2. #2
  3. No Profile Picture
    status unknown
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    262
    Rep Power
    11
    Is there a prototype for bookinfo()? If prototyped, does the number of arguments match in the prototype?

    Can you identify which line the error occurs on?

    Is the code you posted a direct paste of the original code?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    6
    Rep Power
    0
    Thx, the prototype was in a seperate header file and I forgot to put the arguments there! :D

IMN logo majestic logo threadwatch logo seochat tools logo