Creating a C++ tutorial website need help understanding some code

Ok so Im creating a c++ tutorial website, now your probably saying "why? thats what this site is" and you are correct BUT my website is being designed to help people understand the language in very simple and easy to understand language without using all the fancy computer talk so ANYONE who views it will be able to understand. It is designed to spoonfeed absolute noobs at C++. Now with that said, I need help with understanding some code,

#include <iostream>

I know that the # means that it is a directive to the pre processor to include iostream but how can i simplify that? a directive to the pre processor? thats the computer talk i was talking about I was wondering what its doing in plain english also can you explain the using namespace std; I never really looked to far into those.

oh and heres the site so far
Last edited on
Maybe you could make an analogy?

For instance, say the program is a page in a magazine, ready to be proofread and shipped for production. Now, say the compiler is the editor-in-chief and the pre-processor is a lowly editor.

The editor-in-chief, i.e. the compiler, is a busy person. They only want to see the page in its final form. They delegate the initial task of proofreading, scaling the images, picking the fonts, etc. to the editor.

Now, the editor looks over the page and gets to work. When complete, they hand off the page to the editor-in-chief.

The instructions in the program that begin with a '#' (pre-processor directives) are like the work that gets done by the editor at their desk behind the scenes. The program, when compiled, with all the pre-processor directives resolved, is like the page as seen by the editor in its final form.
Im going to do that, but the problem is that i dont really know what # does, i know its a directive to the pre processor but i dont know what that means in plain english and i dont know what that does to the computer or code.
The # indicates that it's code for the compiler.
Imagine it as different programming language that's used build the C++ program together.
If that helps?
closed account (S6k9GNh0)
You should really understand that the audience C++ was meant for is not synonymous to "anyone".
Do you have skype or any other easy ways of communication... I would love to help you out with this (I don't have much knowledge about HTML but I do intend on learning some, and I consider myself to be quite knowledgeable in C++)

I don't ask for anything in return other than written credit for only the things I've contributed a fair amount to (I also think it'd be something cool to work on when I'm bored... Helping even more people out with C++ in different ways).
I dont need help making the site just understanding the # symbol I have everything else covered.
Aww... You know the saying "Two heads are better than one" ? XD
Although you may not need help, do you want any help? I would love to be involved in something great like this to help others out (and you can get it finished in half the time, with everything checked twice as carefully)
This is what i was looking for, so when i explain what #include does in the site this is what i was looking for to say

"Basically it means include the contents of that file in the place of that directive" instead of saying its a directive to the pre processor.
It's linked to the fact that the compilation of code is split in several distinct part.
For details on the C preprocessor, see
closed account (S6k9GNh0)
I would be impressed if you would actually referenced the C++ standard in regards to what it does.
"I would be impressed if you would actually referenced the C++ standard in regards to what it does."

What do you mean the standard?
closed account (zb0S216C)

Topic archived. No new replies allowed.