Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is c++ std_lib_facilities.h still used?

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?

like image 308
r0gue Avatar asked Aug 25 '17 08:08

r0gue


1 Answers

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.

like image 78
Xu Shaoyang Avatar answered Oct 13 '22 01:10

Xu Shaoyang