I just would like to ask what does this error mean and how to fix it thanks!
error: \'sort\' is not a member of \'std\'
You have to #include <algorithm>. See this.
#include <algorithm>
Include the algorithm header. That's why there is a error.