C and C++ core tutorial

A C++ tutorial including C,C++11 and C++14 programming tutorial with a new light on the advanced features of object-oriented programming which includes class,object,data hiding,data encapsulation, data abstraction,inheritance and polymorphism.The other features of C++ standard like templates,namespace, STL-Containers,exception handling and algorithms will be also discussed in detail.The source code of the program from the tutorial will be made available to you so,you can download it using the download button.

***Note:C++11 and C++14 is same as C++ except in C++11, and C++14 some features(libraries) are added to overcome the limitations faced by C++.So I will add the discussion of these new topics (libraries) when there relevant topics are discussed in the chapters.

Introduction to C++


A language developed by Bjarne Stroutoup and widely believed as one of the most difficult languages to learn .Well! I am not trying to scare you here. The fact is C++ originates from C.With the addition of object-oriented features in C ,C++ was born making it hard to code.Here’s a quote from the creator himself.

“C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off.”

C++ actually means C+1 ,C is incremented(increased) by 1 to give C++.This shows the advancement in the language over C although a bit slower than C.

***Note:In some chapters I may even discussed some C codes to show how some program can be optimized with C codes.But,if you are not a fan of C or does not know C then neglect it.

The Index below shows the layout of the chapters and the topics included in the chapter.Every chapter will consist of two parts:Basics and Advanced.Under the Basic section we will discuss the topics only related to the chapter.Under the Advanced section the topics discussed is also related to the chapter but sometimes topics from other chapter may involve due to their relativity with the current topic.This is done to provide you the best possible way of learning the concept which may affect the understanding of some other topic.The material provided in this site may be used as a C++ beginner tutorial tool or as a reference.So you can either jump onto any chapter which interest you or start from Chapter 1 and proceed to the end.Choose whichever method seem best for you.Lastly use the comment section to comment or ask a doubt or whatever deem fit necessary.Enjoy and have fun with C++.


001.Chapter 1 – Data Types

010.Chapter 2 – C of C++

1010.Chapter 10 – Dynamic memory allocation

1100.Chapter 12 – STL containers and iterator


C++11 and C++14 features

*C++11 using auto keyword.

*C++14 auto:new features

*C++11 using decltype() keyword.

*C++14 using decltype(auto) uses.

*C++11 constexpr :: it’s differences with const.

*C++11 enum : scoped enumeration

*C++11 range-based for loop

Smart Pointers
*C++11 Smart pointer : Shared pointer ; why is it call shared pointers?

*C++11 Member functions of shared_ptr class: use_count()unique()get()swap( )reset( ).

*C++11 shared_ptr class internal workings with code example

*C++11 Unique_ptr: what makes it unique?

*C++11 3 points why shared_ptr and unqiue_ptr constructor is made explicit?

*C++11 weak_ptr :a weaker shared_ptr

*C++11 auto_ptr : 4 points why it should not be used ?

*C++11 bad_weak_ptr :a class thrown as exception by shared_ptr.

*C++11 enable_shared_from_this : uses.


*C++11 allocator : what is?

*C++11 allocator_traits: uses




*IDE | Compiler | GUI | Source code.

*The first program.

*Library and how it differs from header’s file.

*Standard C++ library.

*Static and Dynamic library.

*Creating Static and Dynamic library with Code::blocks.

*Compile-time and run-time, stack and heap , static and dynamic.

*How to obtain assembly language code of C++ in Code::blocks/Mingw.

*Suggested website and book for C++.

*Contact me.

The topics given in this C++ tutorial website including the C++11 and C++14 programming tutorials is a result of thorough research and study of the language,I hope it will prove useful to you in many ways.New posts will be updated constantly so do check it out frequently.Happy programming!

*Note the video below shows the best IDE for C and C++ programming.


If you give a man a fish you feed him a day,if you teach him how to fish you feed him his entire life.

-A Chinese saying