How to change the version of the program?

I always see programs that say things like Version: 1.5.6 or something like that. My question is: how to determine the version?

I am a C ++ programmer, so I think this is very important. I also use Visual Studio Ultimate 2012.

EDIT: How to add version to code?

+6
source share
2 answers

There is no real standard or anything else, but this is a common practice:

  • The leftmost number is the “most important” number, which means that it increases when the software changes a lot, always breaking changes.

  • The rightmost number is the "lowest" number, which means that it increases every time the program is freed. This is useful for changes, such as patches.

  • The numbers between them simply cover changes in the mean, for example. not changing, but big changes, such as a major fix.

  • Whenever the number changes, the numbers on the right are reset to 0

  • 1.X stands for the first usable version, 0.X can be considered beta / alpha versions

+2
source

usually you place the version in the VersionInfo entry in the .rc of your project so that the version number is known to the system, for example. when copying a file.

If you need a version number inside your program, then the easiest way is to create the header that you defined with the version number

 #define VER_FILEVERSION 1,0,0,0 #define VER_FILEVERSION_STR "1.0.0.0\0" #define VER_PRODUCTVERSION 1,0,0,0 #define VER_PRODUCTVERSION_STR "1.0\0" 

then include this header both in the .rc file and in the file in which you need it.

+1
source

All Articles