Code:
class Cards
{
private:
char name_of_card [5];
int value;
public:
Cards(int v, char c []);
~Cards();
char [] get_name();
int get_value();
};
My code doesn't seem to like the char [] get_name();
it throws up a error C3409: empty attribute block is not allowed
Then in my constructor for this class i have
Code:
Cards::Cards(int v, char c [])
{
value = v;
name_of_card = c;
}
I'm used to using java but this isn't compiling giving this error
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?