Reputation: 7603
Recently I built a game in XNA and in the AssemblyInfo source file I could set AssemblyVersion to x.x.* and it would set the build and revision to the date and time the project was compiled on. I am now doing a project in C++ and I am wondering how I can duplicate that functionality. Both so that the exe file displays that version and a way I can get it programmatically. Thanks.
Upvotes: 2
Views: 1045
Reputation: 63
Add DATE macro is a good solution I believe.
The compilation date of the current source file. The date is a string literal of the form Mmm dd yyyy. The month name Mmm is the same as for dates generated by the library function asctime declared in TIME.H.
Upvotes: 0