You can use it like that on C++, In C, you have to write it like this.
typedef enum {RANDOM, IMMEDIATE, SEARCH} strategy;
strategy my_strategy = IMMEDIATE;
And personally, it is easier to manage the type and variable, so I would recommend using it as below
typedef enum {RANDOM, IMMEDIATE, SEARCH} strategy_type;
strategy_type my_strategy = IMMEDIATE;
577 Who developed the "avformat-59.dll" that comes with FFmpeg?
623 Uncaught (inpromise) Error on Electron: An object could not be cloned
924 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
614 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.