C plus plus
CHAPTER 1
From 0 to God plus plus mode
In this tutorial we will learn c++ in 10 pages. First we download all the IDEs from the creation of a single cell organism to this day. Then we install and open them all. Copy the following:
#include <iostream>
int main()
{
int a;
char b;
std::cout << "Hello word";
return 0;
}
Paste the code in. Now compile and run. You should see “hello word” in your screen, if you don’t, you suck. That’s your first program, congratulations you are now a level 1 programmer. I hereby grant you the power to click compile and run at will. Now it’s time to unravel the mysteries of the program we just executed. The use of the # (hash) symbol tells the compiler thing to compile stuff. It has the exact same use as twitter. The compiler is a translator who can only translate to French, because they invented the metric system. The #include tells the compiler to prepare the tools in our iostream so we can bake a baguette. The iostream has the tools for the recipe and our program uses them. If we didn’t include iostream the drawers with our pans and spoons and everything is locked. Next is the “int main”. This is German. I believe the translation is “we will take the integers, ja?”. Next in line is the most important thing in programming. The () symbol, commonly mistaken for parenthesis, is the prayer symbol which every programmer uses in every program. It represents the 2 hands pointing to the sky and we use it to gain favor with the gods so that our program may run. Programmers are deeply religious. After that follows the so-called body of our program. They say it’s a body but it looks nothing like it. I mean look at it:
int a;
char b;
std::cout << "Hello word";
return 0;
Is that a body? No, it is not. A body needs a head some hands and feet. Where are my eyes in this body? I’ll tell you where. Nowhere! It looks more like a fallen penis than a body. That is why learning to be a programmer is so difficult. People can’t name the things accordingly. I digress. Inside the body we declared a couple of things. First we said int a; .That means “a” is an integer. So now we can set “a” to whatever integer value we want (included in a 4byte range). Then we ended our phrase with a semicolon, like so ; that means we ended our declaration or whatever else we were doing there. A good rule of thumb is to use these things a lot. Next we “charred” b, as I would like to say, in a similar fashion to a. Charring is tricky and hard to pull off after the middle ages. We continue with the “std::cout << "Hello word";” that phrase is what we output to the screen. The output displays the right side of our operands “<<” and whatever is inside quotation marks is displayed in the screen (“Hello word”). The left side of our operands is very important. That is why we use std::cout. So when we cout we don’t get any sexually transmitted disease. std’s are very dangerous .That side protects us from all the std’s out there. The last line says return 0;. It is there to make you reflect and contemplate about life, it gives you a comforting reassuring result to where everything is going and where it started.
You are now a level 2 programmer. You may post at cplusplus.com forum at will.