Your compiler is trying to tell you that you need a definition for the
sort()
function. Normally, this is found in the
algorithm
header. However, it appears that you are using Turbo C++, which does not seem to include any sort functions.
Turbo C++ (at least the free download version (3.0, (c)1992), predates the STL and normal, modern C++ practices. As such, it's practically useless as both a learning tool and a serious development tool. Just about any web site out there will assume that you have a full STL implementation (c++ 98), and many will expect you to have C++ 11, or even C++ 20 to be able to follow along.
Unless you're constrained to a DOS box, or have very limited download capability, you should investigate the community version of Visual Studio. Its a free version, and the latest versions can compile C++ 20. If you are constrained to DOS, for some reason, you might want to look into
DJCPP[
^] as an alternative to Turbo C++