3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

バージョン管理に使えるenum定義

Posted at
enum tagToolVersion{
    Version1_0 = 0x00000001,
    Version2_0 = 0x00000002,
    Version2_1 = 0x00010002,
    Version3_0 = 0x00000003,
    NowVersion = Version1_0
}ToolVersion;

enum定義内に現在のバージョンを記述することで、他の場所で定義したりせず一括で管理できます。
現在のバージョンを取得したい時には
ToolVersion saveVersion = ToolVersion::NowVersion;
のように記述すればOKです。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?