I would suggest reading
http://www.cplusplus.com/forum/articles/10627/ Disch does a wonderful job at articulating most of those articles/tutorials.
Maybe someone else can go more in depth, but I'll try to answer that:
A standard library is a place where pieces of reusable code reside. |
That's correct in a general sense, yes.
If you're talking about C++, there's only
one C++ standard library. A single header file (such as iostream) is not a "library" in this sense, but it's part of C++ standard library.
Headers that have 'c' at the beginning of them (ex: cmath) are the C++ versions of C's standard library headers (ex: math.h).
1. The #include directive in its simplest sense just copies the text from that file and pastes it where you put the #include statement.
http://www.cplusplus.com/reference/ This page shows a bunch of standard header files for the C++ language. You #include the right ones if you want to use the functions/classes/objects declared in those headers. For example, if you want to use std::vectors, then be sure to #include <vector> before you declare any in your code.
2. You should put #include statements at a global scope,
usually at the top of the file you're working with (after header guards though, if you're working in a header file).