Programming A Chess Engine in C Part 68 - UCI Protocol #3 - Parse Position

preview_player
Показать описание
We chatter on this Discord server:

Video series programming a chess engine in C

**Update May 2014 ** I changed small parts of the code so it compiles with latest GCC, and fixed a couple of small errors.

But really, it's for fun and for free.
Рекомендации по теме
Комментарии
Автор

setbuf() is deprecated.Using VS2015 Community on Windows 10, and starting with a C++ project, I've been typing the code in "by hand".I get "deprecated" errors using setbuf().I switched to setvbuf() and I'm having problems with the fgets() call.I use:setvbuf( stdin, NULL, _IONBF, 0);setvbuf( stdout, NULL, _IONBF, 0);When I run the program I sometimes need to hit the Enter key twice to have fgets() return with the text I entered.Note, if I completely remove the setvbuf (and setbuf) calls, then it seems to work exactly as your video shows, but I imagine I might run into problems later.

tommychan
join shbcf.ru