My code doesn't seem to like the char [] get_name();Code:class Cards { private: char name_of_card [5]; int value; public: Cards(int v, char c []); ~Cards(); char [] get_name(); int get_value(); };
it throws up a error C3409: empty attribute block is not allowed
Then in my constructor for this class i have
I'm used to using java but this isn't compiling giving this errorCode:Cards::Cards(int v, char c []) { value = v; name_of_card = c; }
error C2440: '=' : cannot convert from 'char []' to 'char [5]'
There are no conversions to array types, although there are conversions to references or pointers to arrays
Is it obvious what i'm doing wrong?



LinkBack URL
About LinkBacks


