Including Libraries

I don't know if this is just me, but I don't need to include some libraries in order to use their contents, for example <string> and <locale>. Why is that?
It is the result that other libraries that you included in their turn include these libraries. Nevertheless it is a good style of programming to explicitly specify libraries that are used in the program.
So <iostream> covers <locale> and <string>? Because I can still use both of their contents when I've only included the <iostream> library.

Nevertheless it is a good style of programming to explicitly specify libraries that are used in the program.

Yeah, I thought so as well.
Last edited on
It is implementation defined whether <iostream> will contain <string>.
Topic archived. No new replies allowed.