Looking at what you say you need to use and the name format of this .cpp file, I think I'm in the same class. A year later, it seems, but here is my solution for the archive:
The std_lib_facilities.h header comes with Bjarne Stroustrup's tutorial, "Programming: Principles and Practices Using C ++". For those who did not know, Bjarne Straustrup invented C ++ (he has a good idea what he is talking about). By the way, a book is a fantastic way to learn C ++ if you have time to really read it. The std_lib_facilities.h header is simply a convenient header file for beginners in C ++, containing links to all the basic standard libraries used in the tutorial, as well as some auxiliary functions that help you to take into account possible errors or errors or are just convenient for learning (for example, function error (), which handles a simple exception for the student or adds a check "out of bounds" for vectors). This is, ultimately, just a way to allow students to jump directly into the code without having to learn the specifics of the header. Stroustrup continues to be updated with C ++ and therefore includes several libraries that require the C ++ 11 standard. The CSCE department wants its students (at least in this early class) to connect to the department’s Unix system and compiled from there to avoid confusion with downloading and updating compilers.
Previously, I already had several C ++ classes, and thus I already have g ++ installed on my Ubuntu laptop. I avoided turning std_lib_facilities on for as long as possible, as I got the same error as Creat Creator Joe, where g ++ did not recognize the “C ++ 11” part (manually, including the necessary libraries, they worked fine until we had to use the class from the tutorial which used one of the auxiliary header functions). In the end, I found a help topic on the Internet that advised me to simply upgrade the g ++ compiler to 4.7 or higher, since 4.6 and below do not support C ++ 11 (or, of course, C ++ 14). It was rather strange compared to the updates that could be used on Mac or Windows, and I doubt that the exact process will be applied, but this (was it?), Probably the problem: this is just an older version of g ++, and it Needs an update to compile C ++ 11 and later. I recommend looking for ways to update g ++ / gcc for Mac.
You know, someone else with this problem will stumble on this and have not yet solved the problem.
source share