Different C++ Versions
Introduction
![Different C++ Versions](https://static.tutorialandexample.com/cpp/different-cpp-versions1.png)
The C++ language is a middle-level language that combines low-level and high-level syntax. It is an object-oriented programming language. Danish computer scientist Bjarne Stroustrup developed the programming language at Bell Telephone Laboratories in Murray Hill, New Jersey (now Nokia Bell Labs). As a result, C with Classes (C++) was introduced. He desired a versatile and dynamic language that was identical to C in all respects but added active type checking, basic inheritance, default working arguments, classes, and inlining, among other features.
In 1983, C++, previously known as "C with classes," underwent a name change. Adding one to a programming variety is referred to as C++. In essence, it denotes "one higher than C."
The history of the C++ programming language may be traced back to 1979 when Bjarne Stroustrup started working on his PhD thesis. One of the languages Stroustrup had the opportunity to work with was called Simula, and as its name would imply, it may be primarily intended for simulations. Simula Sixty-Seven, the language Stroustrup used, is recognized as being crucial for supporting the object-oriented programming paradigm.
Stroustrup discovered that while the Simula language was much too slow for practice and actual usage, this paradigm was useful for package creation.
Soon after, he started working on "C with Classes" since, as its name suggests, it was intended to be a superset of the C language. His main goal was to incorporate his advanced object-oriented programming, which he had developed, into the C programming language, which at the time was still regarded as the best programming language because of its portability, compactness, and movability without compromising speed or low-level usefulness. In addition to all or any of the C language's features, his programming language included inlining, rudimentary inheritance, default function parameters, categories, and reliable sort checking.
Cfront, the first C compiler with categories, was derived from CPre, another C compiler. A program had been created to convert C with categories code to universal C. Most Cfront was built in C using classes, making it a self-hosting compiler (a compiler that will compile itself), a pretty attention-grabbing feature worth noting. Later, in 1993, Cfront was abandoned because it was difficult to include new features, primarily C++ exceptions. Nevertheless, Cfront greatly impacted how future compilers were implemented and the UNIX operating system.
The name of the language, C++, replaced C with categories in 1983. Stroustrup's opinion of the programming language can be inferred from the fact that the C language's ++ operator is used to increment variables. Around this time, various new options were introduced, with the most significant ones being virtual functions, perform overloading, references using the const keyword, and single-line comments using two forward slashes (perhaps a BCPL-inspired feature).
The C++ programming language, Stroustrup's book, was printed and published in 1985. The beginning of C++ as a commercial component came about the same year it was made mandatory as an advertisement product. Although the programming language wasn't fully standardized, the book is a crucial resource. In 1989, the programming language underwent yet another modification to include protected & static members, still as an associate inheritance from numerous classes & categories.
The Annotated C++ manual, a reference, was widely distributed in 1990. Only in 1990, in the same year, will Borland's Turbo C++ compiler was released for sale as a promotional item. Other libraries that Turbo C++ added in excess could significantly negatively impact the development of C++. Turbo C++ is still widely used even though the last reliable unharness of the compiler was in 2006.
The first international standard for the programming language, ISO/IEC 14882:1998, also referred to as C++98 was released in 1998 by the C++ Customary Advisory and Standards Committee. It was claimed that a key factor in the improvement of the quality was the Annotated C++ manual. It also included the quality template library, often known as the Standard Template Library, which began its intellectual creation in 1979. The committee thoroughly examined numerous concerns in 2003 that were consistent with their 1998 customary & amended it as a result. The altered language was given the name C++03.
The same C++ committee released a technical report (TR1) 2005 focused on various choices to advance the most recent C++ standard. Since it was believed that the new regulation would be introduced before the end of the first decade, it was given the fictitious name C++0x. Ironically, the new tradition wasn't followed until the middle of 2011. Up to that point, several technical reports had been completed, and a few compilers had started experimenting with adding support for the new options & capabilities.
The updated C++ standard (known as C++11) was completed in the middle of 2011. The new rule was significantly influenced by the Boost library project, and several new modules were taken directly from the appropriate Boost libraries. A few of the updated choices that were included:
- New for loop syntax providing practicality just like foreach loops in specific different languages
- Customary threading library (which, up till 2011, each C and C++ were lacking)
- Variadic templates
- Automotive vehicle (AUTO) keyword
- New instrumentation categories & classes
- New C++ time library, atomics support
- Comprehensive organization library
- Regular expression support
- Higher support for unions and array-initialization lists
The most recent C++ version is C++20. C++23, a more recent and sophisticated version of C++, has just been released.
The most current evaluation of the TIOBE Index for 2019 places C++, which has replaced Python, behind Java and C as the third most used programming language. The recently published C++11 version, which users claim makes it more robust, safe, easy, and expressive, deserves all the credit for this.
With C++, Bjarne Stroustrup has produced some fantastic work. C may be a low-level programming language, in which case it lacks classes. It doesn't have many features that will make programming more lucrative, but it is the fastest language (assembly is faster, but programming in construction isn't something you'd think about). Bjarne Stroustrup added to the object-oriented portion by treating code like real-world objects. The fact that C++ is as fast as C and also a high-level programming language—or, as we like to say, the best of all worlds—is what makes it so delightful. On the other hand, C++ is difficult for beginners to understand, and you can develop Python code in a quarter of the time for a comparable piece of C++ code.
C++ features
The following are C++'s top five strengths:
- Factually speaking, it is the language that is most frequently used in competitive programming. For cryptography, the majority of the top-rated programmers often utilize C++. It is accessible from any web resource.
- Standard Template Library (STL): For those who are familiar with C and are still developing code for bubble type, it is a huge time saver.
- Overloading the operator with several inheritances. Numerous languages need this capability.
- Encapsulation, polymorphism, and the capacity to modularize code, all in all.
Summary Table listing the development of several C++ versions:
Version | Release Date | Major changes |
C++98 (ISO/IEC 14882:1998) | October 1998 | The first version |
C++03 (ISO/IEC 14882:2003) | February 2003 | initialization of values. |
C++11 | August 2011 | Introduction of Rvalue References, Nullptr, Automatic Type Deduction, Delegating Constructors, Lambda Expressions, and Uniform Initialization Syntax. |
C++14 | August 2014 | The inclusion of quoted strings, digit separators, generalized lambda capture, variable templates, and polymorphic lambdas. |
C++17 | December 2017 | Fold expressions, hexadecimal floating point literals, an u8 character literal, initializer selection statements, inline variables, etc., are all introduced. |
C++20 | March 2020 | With the addition of features for inspecting program elements such as variables, enumerations, classes & their members, lambdas & their captures, etc., this upgrade expands the capabilities of C++. |
C++23 | Future Release | Following significant C++ standard revision. |
Conclusion:
There have been multiple iterations of C++, each enhancing and adding to the one before. As a result of the addition of features like lambda expressions & enhanced multithreading support in C++11, the language underwent considerable modernization. Later iterations, including C++17 & C++20, kept improving expressiveness and safety. The C++ language is still evolving, and C++23 is anticipated to introduce new developments. Based on project needs & compiler support for desired features, developers should decide which version of C++ to use.