Things You'll Need:
- Computer
- C++ Compiler
-
Step 1
Now, to start off, you're going to need to unify your libraries. #include iostream brings in the needed libraries for console input/output. So, the first line in your source portion of your compiler will be as pictured:
-
Step 2
To make codes much simpler as they build up, there's an option that greatly cuts out code not needed. using namespace std; keeps you from having to type std::cout each time that output is needed. The Second line will be as pictured:
-
Step 3
There has to be a portion that initiates the actual workable portion of the code. This is called int main(). So, our third line is as pictured, in red:
-
Step 4
Now that we have the part that initiates, we need to set up an area to initiate! We use { and } to contain the functional part of the code. So, our next line is as pictured, in green:
-
Step 5
The actual functional of this code is actually called cout. I remember best as see?-out (out being output) and it's exactly that. Output. This is the part of the code that will print out, "Hello,World!" This line is printed in blue:
-
Step 6
And, for our final line, we close the functional. Again, printed in green, in the picture:














Comments
marierose513 said
on 3/23/2009 very interresting