Realization of "IsProcessorFeaturePresent" on С++ : Help please remake a small piece of code from C# to C++

    class Program
    {
        static void Main(string[] args)
        {
            foreach (ProcessorFeature feature in System.Enum.GetValues(typeof(ProcessorFeature)))
            {
                System.Console.WriteLine(feature.ToString() + "\t: " + IsProcessorFeaturePresent(feature));
            }
        }
    
        [System.Runtime.InteropServices.DllImport("Kernel32")]
        static extern bool IsProcessorFeaturePresent(ProcessorFeature processorFeature);
    
        enum ProcessorFeature : uint
        {
            PF_FLOATING_POINT_PRECISION_ERRATA = 0,
            PF_FLOATING_POINT_EMULATED = 1,
            PF_COMPARE_EXCHANGE_DOUBLE = 2,
            PF_MMX_INSTRUCTIONS_AVAILABLE = 3,
            PF_PPC_MOVEMEM_64BIT_OK = 4,
            PF_ALPHA_BYTE_INSTRUCTIONS = 5,
            PF_XMMI_INSTRUCTIONS_AVAILABLE = 6,
            PF_3DNOW_INSTRUCTIONS_AVAILABLE = 7,
            PF_RDTSC_INSTRUCTION_AVAILABLE = 8,
            PF_PAE_ENABLED = 9,
            PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10,
            PF_SSE_DAZ_MODE_AVAILABLE = 11,
            PF_NX_ENABLED = 12,
            PF_SSE3_INSTRUCTIONS_AVAILABLE = 13,
            PF_COMPARE_EXCHANGE128 = 14,
            PF_COMPARE64_EXCHANGE128 = 15,
            PF_CHANNELS_ENABLED = 16,
            PF_XSAVE_ENABLED = 17,
            PF_SECOND_LEVEL_ADDRESS_TRANSLATION = 20,
            PF_VIRT_FIRMWARE_ENABLED = 21,
        }
    }
I'm trying to create an enumeration, but the compiler writes "Need an identifier". <BR>
The compiler writes that there is already a definition in "winnt.h"

    #define PF_FLOATING_POINT_PRECISION_ERRATA   0

I connected the library as stated in [msdn][1].

    #include <winnt.h>
    #pragma comment (lib, "Kernel32.lib")

I don't even know how "foreach" is implemented on c ++<BR>
Help please, I really need it.


  [1]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724482(v=vs.85).aspx