#include <string.h>
class ITEM // declaration sytax error
{
private:
int price;
char name[ 21 ];
int efatr[ 4 ];
public:
void setName( char* newname );
void setPrice( int newprice );
void setAtribut( int x, int ef );
ITEM()
{
strcpy( name, "Player" );
price = 0;
}
~ITEM();
char* getName();
int getPrice();
int getAtribut( int x );
};
void ITEM::setName( char* newname ) // "declaration syntax errror " and "size of 'ITEM' is unknown or zero"
{
strcpy( name, newname );
}
void ITEM::setPrice( int newprice )
{
price = newprice;
}
char* ITEM::getName()
{
return name;
}
int ITEM:: getPrice()
{
return price;
}
int ITEM::getAtribut(int x)
{
return efatr[x];
}
void ITEM::setAtribut( int x, int ef )
{
efatr[ x ] = ef;
}