Finally on chapter 7 of this C++ Primer book and it's all about classes. Thought I had a decent idea of classes until it started to do this
Code:
struct Sales_data {
// new members: operations on Sales_data objects
std::string isbn() const { return bookNo; }
Sales_data& combine(const Sales_data&);
double avg_price() const;
// data members are unchanged
std::string bookNo;
unsigned unites_sold = 0;
double revenue= 0.0;
};
Just completely lost... And its explanation of everything that's being declared is very difficult to understand, even after re-reading...
I'm gonna try and do some googling but if anyone has some good tuts on classes that would be appreciated
