Hash_map error: causes & fixes?

I am experiencing an error while compiling and running the following GUI code:

#include "Simple_window.h" // Get access to our window library
#include "Graph.h" // Get access to our graphics library facilities

int main()
{
    using namespace Graph_lib; // Our graphics facilities are in Graph_lib
    Point tl{ 100, 100 }; // To become top left corner of window
    Simple_window win{ tl, 600, 400, "Canvas" }; // Make a simple window
    Polygon poly; // Make a shape (a polygon)
    poly.add(Point{ 300, 200 }); // Add a point
    poly.add(Point{ 350, 100 }); // Add another point
    poly.add(Point{ 400, 200 }); // Add a third point
    poly.set_color(Color::red); // Adjust properties of poly
    win.attach(poly); // Connect poly to the window
    win.wait_for_button(); // Give control to the display engine
}

Source of headers and code files: http://www.stroustrup.com/Programming/PPP2code/

I am receiving the error: E0035 #error directive: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.

What is the cause of this error and how can I fix it?

The error is caused by the use of the <hash_map> header, which has been deprecated and will be removed in future versions of C++. To fix the error, replace <hash_map> with <unordered_map> in the necessary header files. You can also define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to suppress the warning.