Hi guys! I've worked so hard on this really long program. I think I'll just post the relevant subprograms. I hope it's still easy to understand.

This is just before the main function.

#include <iostream>
#include <iomanip>
#include <conio.h> 
#include <string>
using namespace std;

//function prototypes
int cashier(); //generates sales slip for purchased book(s)
int invMenu(); //displays inventory menu
void bookInfo(char[14],char[51],char[31],char[31],char[11],
			  int[],double[],double[]); //displays book information
int reports(); //displays report information

const int SIZE = 20; //holds data for 20 books
//global arrays
char bookTitle[SIZE][51]; 
char isbn[SIZE][14]; 
char author[SIZE][31]; 
char publisher[SIZE][31]; 
char dateAdded[SIZE][11]; 
int qtyOnHand[SIZE];  
double wholesale[SIZE]; 
double retail[SIZE];

This is where the error occurs.

void lookUpBook()
{
	char title[51]; //variable for title of book
	int row;
	
	cin.ignore();
	cout << "\n\tEnter the book title: ";
	cin.getline(title,51);
	cout << "\n\tTitle: " << title;

	for(row=0; row<SIZE; row++)
	{
		if(strcmp(bookTitle[row],title) == 0) //if title matches one entered by user
		{
			bookInfo(isbn[row],bookTitle[row],author[row],publisher[row],dateAdded[row],
				qtyOnHand[row],wholesale[row],retail[row]); //ERROR ON PARAMETER 6
			break;
		}
		else 
			cout << "\n\tNo title matching " << title << " was found.";
	}
}

This is the bookInfo function where the parameters should be passed.

void bookInfo(char isbn[][14],char title[][51],char author[][31],char publisher[][31],
		  char date[][11],int qty[],double wholesale[],double retail[])
{

	cout << "\n\n\tSerendipity Booksellers\n";
	cout << "\tBook Information\n\n";
	cout << "\tISBN: " << isbn << endl;
	cout << "\tTitle: " << title << endl;
	cout << "\tAuthor: " << author << endl;
	cout << "\tPublisher: " << publisher << endl;
	cout << "\tDate Added:" << date << endl;
	cout << "\tQuantity-On Hand: " << qty << endl;
	cout << "\tWholesale Cost: " << wholesale << endl;
	cout << "\tRetail Price: " << retail << endl;
}

The error

error C2664: 'bookInfo' : cannot convert parameter 6 from 'int' to 'int []'

I'm so sure that when this error is resolved, the new error will be "cannot convert parameter 7 from 'double' to 'double[]'. I don't want this to happen. I've worked so hard...

I'm just a newbie, so please go easy on me. I'm sorry.

The function is expecting an int[] (array/pointer) type and you pass an int, instead you should write the function as: void bookInfo(char[14],char[51],char[31],char[31],char[11],int,double,double); It would also be better if you used strings from the <string> header instead of arrays of char s.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.