包括在C ++中(Including In C++)

在C ++中,您必须包含某些库才能使用某些命令。 例如,键入#include <iostream>以使用std::cout和std::cin 。

我总是忘记要使用什么命令包括什么,所以我想知道是否有一种简单的方法可以记住,或者是否可以包含所有内容。

任何方式来帮助我和那些有这个问题的人记住不同的包括或一种方式,使包括更简单,是值得赞赏的!

In C++, you have to include certain libraries to use certain commands. For example, you type #include <iostream> in order to use std::cout and std::cin.

I always forget what to include to use what commands, so I wonder if there is an easy way to remember, or if it's possible to include everything.

Any way to help me and other people out there who has this problem remember the different includes or a way to make including simpler is appreciated!

最满意答案

包括所有内容将需要永远编译,所以不建议。

http://www.cplusplus.com/可以告诉您几乎所有需要的内容。

此外,随着时间的推移,你将开始记住它们。

Including everything would take forever to compile so that is not advised.

http://www.cplusplus.com/ can tell you what to include for almost anything you are going to need.

Also, you will start to remember them over time.

更多推荐