Alessandro Scotti wrote:You don't really need lltoa, you can replace this:
Code: Select all
lltoa(count, buf, 10);
printf("perft(%d)=%s (%6.3f sec)\n\n",
i, buf, t*(1./CLOCKS_PER_SEC));
with this:
Code: Select all
printf("perft(%d)=%I64d (%6.3f sec)\n\n",
i, count, t*(1./CLOCKS_PER_SEC));
In C++ "new" is a reserved work but it can be the name of a variable in C (seems to be unused anyway).
Thanks
Now it compiles for me but I do not know how to use it because if I run it in console mode it simply get no input and exit.
I never use in programming
int main(int argc, char **argv) and I simply always use
int main(void) and if I want to test perft I can type the information in console mode.
I guess that there is some way to give it information in the parameters of main but I do not know how to do it.
I get the following screen when I run it
Usage is: perft <depth> [H<hash size>] [-<split depth>] [<FEN string>]
<hash size> = 20 gives you 2^20 = 1M entries (16MB)
Press any key to continue . . .
Edit:I could use it simply by modifying the code
I still do not know how to use the parameters of main
Uri