Once again... compilation error that Mr. Mosh isn't getting

If you got to Part 2 - Intermediate of the Ultimate C++ course, go down to streams and files, and select ep. 4 you will eventually see the following code
Screenshot 2024-03-14 190608
as you can see, underneath numeric_limits, I am getting a compilation error saying
"Implicit Instantiation of undefined template ‘std::numeric_limits’ "
If you know the solution to this please let me know.

#include <limits>

Just tried doing that, the code works now, but why did I have to include limits when Mr. Mosh didn’t?

Depends on compiler or language version being used. Course follows C++20 language version. Probably MinGW (GNU GCC) as compiler.