I own many game programming books, all of them using C++ as the reference language but what is important about them is not the code, it is the theoretical knowledge kept in them. How do graphics work, how do you structure a game program, how do you solve common problems, etc. etc.
If I am perfectly honest, of that big pile of books I have, about 90% of it was completely useless for practical purposes in the end. Most books hammer for far too long on setting up a development environment and rehash all the “how to program for operating system X” without even touching game development at all, before going into a rehash of the API documentation of whatever graphics API is used. Sound and input tend to be rushed single chapters while topics such as AI are a paragraph mentioning that its hard and out of scope. Chapters on wiring an actual game together tend to be of the “Yeah I built this game for you, let me print parts of the code in the book and go through it line by line” - example game being broken and uncompilable by default of course.
But still that remaining 10% was theory that stuck with me. It wasn’t worth the price I had to pay for such works though, but it was all I had with no real connection to the internet yet. Nowadays: nah, use the internet.