0

Is there a way to print out the integral value of enumerator?

I tried to search related questions but no good. So I suspect that this isn't a common requirement for most of people. But I do occasionally need to know the integer, the enumerator representing.

For IDE, usually this can be accomplished when hovering the cursor above the specified enumerator.

Update

As an example, the following listing illustrates what I want. The vertical bar (┃) indicates where the cursor/point is.

enum FOO
{
  FOO_A = 0,
  FOO_B,
  FOO_C┃,
};

After hovering over for a short period, I expect to see the integral value of FOO_C to be 2.

HQW.ang
  • 1
  • 2

0 Answers0