I'm learning C++ from Programming : Principles And Practice By Bjarne Stroustrup. They have given a sample program:
// read and write a first name
#include "std_lib_facilities.h"
int main()
{
cout << "Please enter your first name (followed by 'enter'):\n";
string first_name; // first_name is a variable of type string
cin >> first_name; // read characters into first_name
cout << "Hello, " << first_name << "!\n";
}
When I type the same code in visual studio, it gives error for the header file "std_lib_facilities.h". I'm confused with this header file.
Is it still used? What else can I use instead of this header?
In the Appendices (C.3.2 to be specific) of the Book - Programming: Principles and Practice Using C++ -, you can actually find the author explaining about this specific header file - std_lib_facilities.h, and he left a link for the readers to download (http://www.stroustrup.com/Programming/std_lib_facilities.h).
Since learners must download the file and place it in a directory of your choice, I deduce from this point that the file is not a header file people would actually use, but solely for pedagogical uses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With