Reputation: 13267
Following code is not compiling, can anybody please help what is wrong here
class CTrapInfo
{
public:
enum GenericType
{
ColdStart,
WarmStart,
LinkDown,
LinkUp,
AuthenticationFailure,
EGPNeighborLoss,
EnterpriseSpecific
};
CTrapInfo();
CTrapInfo(const CTrapInfo&);
~CTrapInfo();
CTrapInfo &operator=(const CTrapInfo&);
static GenericType toGenericType(const DOMString&);
};
Compiler error is :
error C4430: missing type specifier - int assumed.
Note: C++ does not support default-int MSDN says this is valid in c++ http://msdn.microsoft.com/en-us/library/2dzy4k6e%28VS.80%29.aspx
Upvotes: 0
Views: 417
Reputation: 39109
For which line does the compiler indicate the error? It could be that you did not include a definition for DOMString
, so that the compiler might assume int
in toGenericType(const DOMString&)
.
Upvotes: 0
Reputation: 7516
Are you sure CAPTrapInfo and DOMString are defined? If they are not defined you will get the error.
Upvotes: 0
Reputation: 76
It compiles for me, in VS2005, if I forward declare class CAPTrapInfo and class DOMSTring.
Upvotes: 2