Search Result

Collapse
5 results in 0.0014 seconds.
Keywords
Members
Tags
enum
  •  

  • Dr Cake
    started a topic Custom Enum for MessageBox

    Custom Enum for MessageBox

    Hello, recently I've been trying to "play" with MessageBoxes and wondered how may I add custom buttons. A basic MessageBox should look like this:
    Code:
    MessageBox.Show("Message", "Title", MessageBoxButtons.Something);
    However, I'd like to know how to create one with Once, Weekly, Monthly, Daily and Cancel, instead of MessageBoxButto ns.Something. I've tried creating an enum and it displayed on the MessageBox,...
    See more | Go to post

  • tayyab6
    started a topic enum in a structure doesn't work passed to a function?
    in C

    enum in a structure doesn't work passed to a function?

    I have made a program in C++ which does not accept the value of a an enumeration variable defined within a structure, when I pass the structure into a function.
    It does not even accept the value YES or NO in the main function.

    Help me out please. :)

    Code:
    #include <iostream>
    using namespace std;
    
    struct student
    {
    	char name[20];
    	int age;
    	enum {YES,NO}
    ...
    See more | Go to post

  • Use flags enum as replacement for missing c# 'in'-operator

    This is actually an answer to an old post which is closed. But it may nevertheless be useful to someone.

    Old Post: Has if () syntax of C# no IN operator like Pascal or SQL (IN, LIKE,BETWEEN)?

    Good, short and fast possibility is to define the enum as flags, like e.g.:

    Code:
    [Flags]
    internal enum TokenType
    {
    	Empty = 0,
    	LBrace = 1,
    	PlusLBrace = 2,
    	RBrace = 4,
    ...
    See more | Go to post

  • Sri13
    started a topic How to initalize enum to null or blank?

    How to initalize enum to null or blank?

    Is there a way to initialize an enum to null/empty?

    Code:
    public enum Color
    {
      Red,
      Blue
    }
    How to do something:
    Color c = null;
    or
    Color c = "";
    See more | Go to post

  • theBNich
    started a topic Initializing static arrays with enum indices
    in C

    Initializing static arrays with enum indices

    Hi, I currently have an enumeration in class Lexer:

    Code:
    enum lexType {
    
        /* token keywords */
        lexIF, lexTHEN, lexWHILE, lexDO, lexBEGIN, lexEND, lexELSE, lexPROGRAM,
    
        ...
    
        /* used for array iterations */
        lexENUMSIZE
    };
    I have an array used to get the string representations of these types:

    Code:
    const char* lexTypeNames[lexENUMSIZE
    ...
    See more | Go to post
Working...