Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Can I tell my chess program to know the name of it's exe file.

Author: Thorsten Greiner

Date: 06:19:24 06/11/04

Go up one level in this thread


On June 11, 2004 at 08:30:29, Uri Blass wrote:
>
>The question is how to do it.

I would suggest to put a version number in the source file which you increment
with each release. You can then assemble the names of the needed files like
this:

--> snip <--

#include <stdio.h>

#define VERSION "237"

#define BOOKFILE "book_" VERSION ".bin"

int main(int argc, char *argv[]) {

    printf("I will use bookfile %s\n", BOOKFILE);

    return 0;
}



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.