B.1 — Introduction to C++11

What is C++11?

On August 12, 2011, the ISO (International Organization for Standardization) approved a new version of C++, called C++11. C++11 adds a whole new set of features to the C++ language! Use of these new features is entirely optional -- but you will undoubtedly find some of them helpful. The prior tutorials have all been updated to be C++11 compliant.

The goals and designs of C++11

Bjarne Stroustrup characterized the goals of C++11 as such:

  • Build on C++’s strengths -- rather than trying to extend C++ to new areas where it may be weaker (eg. Windows applications with heavy GUI), focus on making it do what it does well even better.
  • Make C++ easier to learn, use, and teach -- provide functionality that makes the language more consistent and easier to use.

To that end, the committee that put the language together tried to obey the following general principles:

  • Maintain stability and compatibility with older versions of C++ and C wherever possible. Programs that worked under C++03 should generally still work under C++11.
  • Keep the number of core language extensions to a minimum, and put the bulk of the changes in the standard library (an objective that wasn’t met very well with this release)
  • Focus on improving abstraction mechanisms (classes, templates) rather than adding mechanisms to handle specific, narrow situations.
  • Add new functionality for both novices and experts. A little of something for everybody!
  • Increase type safety, to prevent inadvertent bugs.
  • Improve performance and allow C++ to work directly with hardware.
  • Consider usability and ecosystem issues. C++ needs to work well with other tools, be easy to use and teach, etc…

C++11 isn’t a large departure from C++03 thematically, but it did add a huge amount of new functionality.

Major new features in C++11

For your interest, here’s a list of the major features that C++11 adds. Note that this list is not comprehensive, but rather intended to highlight some of the key features of interest.

There are also many new classes in the C++ standard library available for use.

B.2 -- Introduction to C++14
A.3 -- Using libraries with Code::Blocks

22 comments to B.1 — Introduction to C++11

  • Hardik

    Alex? Which is the best WEBSITE or BOOK to learn graphic desigining in C++ (basic to advanced) ?
    Thanks in Advance 🙂
    Waiting for your Reply…..

  • silasqwerty1

    Have you considered making a similar page for C++14? I know it wasn’t really a big release (at least in comparison), but I think it would be useful for reference if nothing else.

  • ali

    hi alex,
    we are looking forward (a long time) topics that are not tutorial yet. please don’t forget us 🙂 especially threads and lambda.

  • Mirza Safaraz

    hi Alex, after reading all of this material, what should I do then to master cpp, any recomendation ?
    Thanks before, this tutorial make a lot of sense

    • Alex

      Put your knowledge into practice. Write lots of programs. Learn something new (e.g. graphical applications in C++).

      • Mirza Safaraz

        okay I’ll do it, thanks for this great tutorial !!!

      • Paolo Lampitella

        You should really consider writing yourself some tutorial on graphical applications. While each major package out there already has extensive tutorials, let me say that I find your approach quite unique and very valuable, as it is both complete and meaningful in the path it follows trough the different topics. When following your tutorial, I had to go back only once, for an example using a const pointer to a c-style string (which I simply forgot it has static attribute and doesn’t go out of scope, but that was eventually explained in a comment This is something that everybody would be pleased to see applied to any possible programming scenario. I recognize the caducity of any information related to some library with respect to a programming language (still, C++ is not exactly steady with respect to, say, Fortran), but if you mix that with design patterns (as per other requests), that’s something that is going to have absolute value. Just look at how bad are all the books on Qt, for example.

        • Alex

          I’ve definitely thought about it. But there’s still so much from fundamental C++ (and especially the standard library) that warrants exploration and has broader application… so I probably won’t get to this anytime soon. 🙁

  • Ariela

    Looking forward to a possible tutorial on lambdas, because I can’t for the life of me wrap my head around them.

  • Mehul

    Hi Alex,

    Can you also please create the tutorial for design patterns ..

    As i love your tutorials as it gives me in depth information of topics


  • Le Thu Ha

    I dont see smart pointer here. It is quite a topic in c++11.

  • savino

    where can we start to learn android programing or smart phone programng? what do you recommend to learn? windows 7,8, android, ois,?? whats next? thanks

  • 1pavan23

    Good work by this site.
    Please provide information in Design patterns like
    (Singleton, Abstract Factory, Builder, Factory methods, Template Method, Observer, Adapter, Facade) with good examples

    I am waiting for above information.

  • fsxfreak1

    Awesome, was waiting for this!

Leave a Comment

Put C++ code inside [code][/code] tags to use the syntax highlighter