Results 1 to 2 of 2

Thread: [RESOLVED] enums?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Resolved [RESOLVED] enums?

    CSHARP Code:
    1. public enum BtnFunc : byte
    2. {
    3.     BFN_CLEAR = 0x1,
    4.     BFN_DEL_BTN = 0x0,
    5.     BFN_REQUEST = 0x3,
    6.     BFN_USER_CLEAR = 0x2
    7. }




    How would that be done in c++?

  2. #2
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    710

    Re: enums?

    Nearly identical:

    Code:
    enum BtnFunc : int
    {
    	BFN_CLEAR = 0x1,
    	BFN_DEL_BTN = 0x0,
    	BFN_REQUEST = 0x3,
    	BFN_USER_CLEAR = 0x2
    };
    However, the ": int" part is Microsoft-specific I think, so drop it if you're not using VC++.
    Last edited by David Anton; Jan 6th, 2009 at 11:03 PM.
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width