epirasta
December 4th, 2003, 11:46 PM
i have this class..
class IObject
{
public:
virtual string ToString() = 0; // Get a string representation of the object.
virtual string GetType() = 0; // Get the type of the object.
virtual bool Equals(IObject &value) = 0; // Returns true if the given type and content are equal.
virtual IObject* Clone() = 0; // Create a new instance by making a deep copy of the current object data.
};
and this error:
IObject.h(4) : error C2146: syntax error : missing ';' before identifier 'ToString'
IObject.h(4) : error C2433: 'IObject::string' : 'virtual' not permitted on data declarations
IObject.h(4) : error C2501: 'IObject::string' : missing storage-class or type specifiers
IObject.h(4) : warning C4183: 'ToString': missing return type; assumed to be a member function returning 'int'
i don't why..
thx a lot if u can help me..:confused:
class IObject
{
public:
virtual string ToString() = 0; // Get a string representation of the object.
virtual string GetType() = 0; // Get the type of the object.
virtual bool Equals(IObject &value) = 0; // Returns true if the given type and content are equal.
virtual IObject* Clone() = 0; // Create a new instance by making a deep copy of the current object data.
};
and this error:
IObject.h(4) : error C2146: syntax error : missing ';' before identifier 'ToString'
IObject.h(4) : error C2433: 'IObject::string' : 'virtual' not permitted on data declarations
IObject.h(4) : error C2501: 'IObject::string' : missing storage-class or type specifiers
IObject.h(4) : warning C4183: 'ToString': missing return type; assumed to be a member function returning 'int'
i don't why..
thx a lot if u can help me..:confused: