[computer-go] Strangest C++ problem yet
Gunnar Farnebäck
gunnar at lysator.liu.se
Sat Sep 2 11:25:11 PDT 2006
Peter wrote:
> void acknowledge(const string message = "") {
> if (commandID >= 0) {
> cout << "=" << commandID << " " << message << endl;
> } else {
> cout << "= " << message << endl;
> }
> }
>
> This works fine from the command line and through glGo, but it chokes
> for gogui, Goban, and kgsGtp. Specifically, gogui complains that the
> program never responds to the "name" command.
>
> Now here's the really strange part: if I change that last line to
>
> cout << "Acknowledging " << message << endl;
>
> it DOES produce output, although of course it's not a proper GTP
> response.
>
> Again, either version behaves as expected on the command line or
> through glGo.
Unless "message" is already newline-terminated you need to add one
more newline.
/Gunnar
More information about the computer-go
mailing list