Im writing a class Book, which has several data members and 1 const data member. My problem is that i need to put conditions on the const data members but I have no idea how to do so.
1 2 3 4 5 6 7 8 9 10 11 12 13
class Book
{
private:
char *BookName;
constchar Category;
int Pages;
int Pub_Date;
double Price;
Book(char Array[],int N,int P,int K, int D,int C):Category((C='R' || C='A' || C='S')?C:'S') //Here is the error
// the other set functions
}