Welcome to the beginning C++ programming tutorials. In this series you will learn how to get started programming in C++. C++ is a very large programming language. Many people go crazy thinking they need to know EVERYTHING! Please, do not think you need to know every single line of code in c++. You might go crazy. But learning what you need to know, and what you want to know always turns out much better. All of the good C++ programmers say that they only learned what they needed to know. Well, what do you need to know? It depends, are you going to get into game programming? Visual development? It takes some time knowing what you want to do, but in this series, I will teach you the basics of the ANSI Standard library used in almost all the types of programming.
Enough of the lecture, let’s get started! First off, you need an IDE. I recommend you download either Microsoft Visual C++, Eclipse C++, or Dev C++. They are all free. Once you have those downloaded, create a new project for console.
#include <iostream>
int main()
{
std::cout << “I am a C++ Programmer!”;
return 0;
}
In this block of code, we have our first line which is
#include
this is code to include the standard library. In later tutorials we will go into what the “#” means, but for now it is essential for your program to work.
Next we had…
int main()
{
return 0;
}
All C++ programs have a main function which is, main().
The “int” before main is something to tell the compiler that the function is going to return a value. We will cover this later when we get into functions.
Return 0
This means that the program, when run successfully, will return a value of 0. If not, then return a value of 1.
std::cout << “I am a C++ Programmer!”;
std means that it is referring to the standard library. The two :: shows that a function from the library will come from that library.
Like the one we have here.
cout << “I am a C++ Programmer!”;
cout stands for console-out. Which will output text to the console. It will output what is in quotes. But the two << means that the console text is going out. Later on we will review what >> is used in.
Summary
Today, we learned a little bit about the C++ programming language, and wrote our first small program using standard library.
Write it!
1.) Write a program that will output, “My name is (yourname) and I am officially a c++ programmer!”
-Sebastian Shanus
Popularity: 100% [?]


