hey guys, Im working on a small text based RPG, and im creating a class called obj
to create all my swords and staffs and things, like such
[code/]
class obj
{
char name[];
int weight;
void attack();
void magic();
};
[/code]
my only problem is when i try to assign a name to my object like
obj sword;
sword.name = "Sword";
i keep getting a compiler error saying incompatable types in assignment of
const char [6] to char[0]
is there something special i have to do to assign a string to the class?