how do define an enum that contains reserved words?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

e.x.:

public __value enum DbTypes
{
String
Int32
Int64
Int16
Object
Guid
};

instead, I need to use

public __value enum DbTypes
{
string
int32
int64
int16
object
guid
};

Is there a way around this in c++ 7.X? If so, please show an example.
 
Hasani,
public __value enum DbTypes
{
String
Int32
Int64
Int16
Object
Guid
};

Try

public __value enum DbTypes
{
__identifier(String),
__identifier(Int32),
__identifier(Int64),
__identifier(Int16),
__identifier(Object),
__identifier(Guid)
};
 
Thx
Tomas Restrepo (MVP) said:
Hasani,

Try

public __value enum DbTypes
{
__identifier(String),
__identifier(Int32),
__identifier(Int64),
__identifier(Int16),
__identifier(Object),
__identifier(Guid)
};
 
Back
Top