Thursday, April 2, 2015

Махонькая задачка


Sometimes it’s very important to know how much builds you have built. Here is the simple way how to do it. Everything you need is to make build counter console application. Source code of buildcounter.cpp: #include <stdio.h> void main() { FILE * file1 = fopen( " build.txt " , " r " ); int build = 0 ; if (file1) fscanf(file1, " %d " , & build); else return ; fclose(file1); printf( " Build %d\n " , build); FILE * file2 = fopen( " build.txt " , " w+ " ); if (file2) fprintf(file2, " %d\n " , ++ build); else return ; fclose(file2); } As you can see current build is written to the file build.txt. Thereafter you need to add your buildcounter.exe to pre-build event command line.
►  2015 (5) ►  March (2) ►  February (1) ►  January (2) ►  2014 (25) ►  December (2) ►  November (2) ►  October (2) ►  September (1) ►  August (1) ►  July (3) ►  June (1) ►  May (2) ►  April (1) ►  March (4) ►  February (4) ►  January comersa (2) ►  2013 (29) ►  December (1) ►  November (3) ►  October (3) ►  September (1) ►  August (3) ►  July (2) ►  June (2) ►  May (4) ►  April (3) ►  March (6) ►  January (1) ►  2012 (13) ►  November (1) ►  October (1) ►  September (1) ►  June (1) ►  May (1) ►  April (1) ►  March (2) ►  February (4) ►  January (1) ►  2011 (49) ►  December (2) ►  November (3) ►  October (13) ►  September (6) ►  August comersa (4) ►  July (1) ►  June (4) ►  May (3) ►  April (5) ►  March (3) ►  February (2) ►  January (3) ▼  2010 (17) ►  November (1) ►  October (1) ►  September (2) ►  August comersa (1) ►  July (2) ►  June (1) ►  May (3) ▼  April (5) Trigraphs XNB reverse engineering Adding the build counter line to MSVS output Set locale и русские буквы в консоли Compiling code from the command line ►  March (1)
4 weeks ago
Махонькая задачка
1 year ago
3 years ago


No comments:

Post a Comment