class book
{ private: int price;char name[50];char pub[50];char author[50];
public:
void input()
{
//geting values
}
void search(book a,book b,book c,book d,book e)
{
book f;
char B[50];
cout<<"Enter book name to be searched"<<endl;
cin>>B;
// condition of logic
return f;
}
int main()
{
book b1,book b2, book b3, book b4, book b5, book b6;
//calling funtions
b6=b6.search(b1,b2,b3,b4,b5)
class book
{ private: int price;char name[50];char pub[50];char author[50];
public:
void input()
{
//geting values
}
void search(book a,book b,book c,book d,book e)
{
book f;
char B[50];
cout<<"Enter book name to be searched"<<endl;
cin>>B;
// condition of logic
return f;
}
}
int main()
{
book b1,book b2, book b3, book b4, book b5, book b6;
//calling funtions
b6=b6.search(b1,b2,b3,b4,b5)
b6.output();
getch();
return o;
}
See I used the code tag by pressing the <> icon when I put code.
You had quite a large number of errors. I got it up to here, but you need to declare variable 'o' and add a definition for the output method in the book class, before this will work.
So progress then.
Going to point out a few of the things I see that would give you errors,
first of, close classes with }; not } (note that this is only for classes and nothing else (other than maybe structs and similar)).
Secondly book b1,book b2, book b3, book b4, book b5, book b6;
either change all your commas ',' to semicolons ';' or a more simple solution remove book at every point other than the beginning.
If you're getting more errors post them.
EDIT:
Ninja'd, damn forums not showing recent posts some times