仍然使用c ++ std_lib_facilities.h吗? [英] Is c++ std_lib_facilities.h still used?

查看:103
本文介绍了仍然使用c ++ std_lib_facilities.h吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从Bjarne Stroustrup的《编程:原理与实践》中学习C ++.他们提供了一个示例程序:

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";
}

当我在Visual Studio中键入相同的代码时,它给头文件"std_lib_facilities.h"提供了错误.我很困惑 这个头文件.

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?

推荐答案

在本书的附录(特定于C.3.2)-编程:使用C ++的原理和实践-中,您实际上可以找到作者对此进行解释特定的头文件-std_lib_facilities.h,他留下了供读者下载的链接( http://www.stroustrup.com/Programming/std_lib_facilities.h ).

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.

这篇关于仍然使用c ++ std_lib_facilities.h吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆