classes c++

I have class Book, which have name, price and barcode. I need to create method bool isSame(Book *b), which returns if two barcodes are the same. How can i do this?
1
2
3
4
5
bool Book::isSame(book *b)
{
  // add code here to decide if (barcode == b->barcode)
  // if they are the same, return true. Otherwise, return false
}
Last edited on
Topic archived. No new replies allowed.