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)
};
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top