|
|
|
|
|
by Animats
1530 days ago
|
|
I had the Fortran book and so, when the C book came out, I bought that as well. The C code seemed to have been auto-generated by the Fortran code, and it was really quite terrible. Oh, yes. The arrays in the C code were indexed from 1, following the FORTRAN code, with functions to convert the subscripts. Pointers to arrays were offset by one element size, so they didn't point to the array at all. They pointed to an address outside of the array. I rewrote parts of NR in C++, but ancient, 1990s C++, with pre-STL Microsoft collection classes. |
|