Aha! Yes, that information would have been quite useful and saved me some time in the C -> C++ conversion. I have learned my lesson and will no longer try everything I know before asking for help. I compiled Klauke's original code, and ran it on game.5 (which is the file we were working on yesterday). The output is result.5. I'm attaching all of his code, and the input and output files. It would have been very difficult to figure out how to use the program without fiddling with the code, since none of it is documented, and the input order is not specified. To compile the code, one must write: g++ main.cpp nuk.cpp rand.cpp -lm To run the program, the command is: a.out x p where x is the game number (it looks for a file called game.x), and p (optional) is the precision (number of decimal places of calculation and output -- note: program still uses double and float, so the true maximum is the same 15 as the C version). So to evaluate game.5, I enter: "a.out 5" where the default precision is six decimal places. The solution (documented in a file called result.5) seems to agree with what we had in the other code. I think that the conversion time was not wasted, as it gave me an opportunity to really dig into the program and understand its intricacies and deficiencies. But yes, seems like it worked all along. -Alex John F Nash wrote: > Dear Alex, > > According to COMPUDOC the "mantra" for compiling in terms > of C++ programs is > > g++ progname -lm > . > Of course this may not be PRECISELY correct, and I wonder whether > or not progname should be in a special form. > But in any case it would be very interesting to know whether or > not Klauke's program, in its original form, needed a correction to > prevent it from being satisfied with a wrong answer. > Considering all the computer expert resources that there are here, > it should be possible to get a C++ program to be compiled except > only if there is/are (an) error(s) in the program. > > John > -- _______________________ Alex V. Kontorovich '02 13 Prospect Street Tower Club Princeton, NJ 08540 (609)986-9905 http://www.princeton.edu/~alexk