Introduction to C++

C++ is known as a general-purpose programming language and derived from C. Bjarne Stroustup developed C++ in 1979 in order to be able to implement classes thus naming this programming language “C with Clasess”. What made it stand out from C was the addition of classes, operator overloading, polymorphism, templates, amongst other features.
C++ comes with a powerful Standard Library, a collection of classes and functions at your disposal. The standard library provides several data containers, math functions, algorithms, and more. All you need to know is how to utilize them to create small programs in a little amount of time.
I’ll be guiding you through C++ in the next couple of weeks so anyone can learn. I’ll provide code, samples, detailed explanations and more. So yes, you can get started programming a couple of simple steps! If the following vocabulary intimidates you, don’t worry. I’ll explain all of it later!
Why C++?
Listed below are a few advantages of working with C++
Portability
Ability to program in any OS environment with the appropriate tools. Ubuntu and Codeblocks allow you to get started right away!
Object-Orientated Programming
Allows reusability of code by allowing the programmer to create objects in order to program more efficiently.
Modular Programming
Ability to write your code in multiple files allowing you to save time when you compile. In other words, whatever files you make changes to will be compiled.
Backwards Compability with C
C++ is backwards compatible with C. You can also include your C code into C++ easily.
Improvements over C
Below are a couple of improvements over C.
1. Templates
2. Objects
3. Encapsulation
4. Inheritence
5. Polymorphism
Hello World!
Whenever you start programming you usually start with printing out Hello World to your terminal. Below is the following code.
#include
using namespace std;
int main()
{
cout << "Hello World" << endl;
return 0;
}
Yes, it’s that simple. I’ll explain more in detail how it works.
Helpful Resources
Ubuntu is a user-friendly OS driven by a strong community. This environment is usually very popular amongst programmers.
Codeblocks for Windows allows you to start programming right away!


01. May, 2008 





No comments yet... Be the first to leave a reply!