Bjarne Stroustrup, creator bahasa C++
Bjarne Stroustrup, creator bahasa C++

The Quick Way to Learn C++ Coding: A Beginner’s Guide

So, you’ve decided to learn C++. Maybe it’s a requirement for your studies, or perhaps you’re genuinely fascinated by it.

Often, it’s the university coursework that leads people here, right? 😄

But rest assured, learning C++ is definitely a worthwhile endeavor.

In fact, I believe learning C++ is advantageous. With C++, you can create a wide range of programs.

Think about developing Games, Desktop Applications, Web applications, networking tools, hacking utilities, and even Mobile apps.

In this article, we’ll get acquainted with the C++ language.

We’ll start by exploring its history and origins, and then prepare you for your initial steps in learning C++.

Let’s get started…

What Exactly is C++?

C++ is a programming language created by Bjarne Stroustrup. 1

Bjarne Stroustrup, creator bahasa C++Bjarne Stroustrup, creator bahasa C++

Bjarne Stroustrup, the creator of the C++ language.

As the name suggests, the “++” symbol in C++ signifies an increment of C.

Essentially, C++ is similar to the C language but offers more features.

Hence, it’s named C++ (pronounced “C plus plus”).

So, how does it differ from C#?

C# is a language developed by Microsoft and runs on the .Net virtual machine. C++, on the other hand, runs natively, just like C.

Syntax-wise, C++ and C# are quite different. In my opinion, C++ is closer to C, while C# is more akin to Java.

Some even consider C# to be an evolution of C++.

This could be true, as the C# ecosystem—in my view—is more robust compared to C++.

However, keep in mind that there’s no inherently “best” or “worst” language. Every language has its strengths and weaknesses.

C# is excellent, but C++ is faster due to its native execution.

The C++ language itself draws significant inspiration from the Simula language.

Why is that the case?

Let’s delve into its history…

The History of C++

In 1979, Bjarne Stroustrup, a computer scientist from Denmark, began developing the C++ programming language.

His initial motivation stemmed from his experiences during his Ph.D. thesis work.

During that time, while working on his thesis…

He discovered that the features of the Simula language were incredibly helpful for building large-scale applications.

However, Simula was quite slow.

The story continues when he joined AT&T Bell Labs.

He encountered a problem while analyzing the Unix kernel related to distributed computing.

This experience brought back his memories of working on his thesis.

Ultimately, he decided to create a new language by extending the C language and incorporating features similar to Simula.

Besides Simula, C++ also took inspiration from languages like ALGOL 86, Ada, CLU, and ML.

In 1982, Bjarne’s new language was named C++, and several features were added, including classes, virtual functions, operator overloading, references, constants, and more.

In 1985, The C++ Programming Language book was published and became the primary reference for the C++ language at the time.

The C++ Programming Language book

In 1989, C++ version 2.0 was released, followed by the publication of The C++ Programming Language Second Edition. This version introduced features like abstract and protected members.

In 1998, C++ achieved language standardization, known as C++98.

C++ Language Versions

C++ language versions are determined by the standardization they adhere to. For instance, C++98 refers to the version of C++ that follows the 1998 standard.

The standardization of C++ is managed by ISO (International Organization for Standardization).

Why is standardization necessary?

It prevents C++ from being implemented arbitrarily. Many entities develop C++ compilers.

The purpose of standardization is to ensure consistency across all these compilers.

Imagine if IBM created a C++ compiler, and so did the GNU community.

If their implementations differed, it would create significant complications.

We’d have to learn “IBM’s C++” and “GNU’s C++” separately.

Therefore, standardization is essential.

Currently, C++ has several standards:

Year C++ Standard Name Common Name
1998 ISO/IEC 14882:1998[23] C++98
2003 ISO/IEC 14882:2003[24] C++03
2011 ISO/IEC 14882:2011[25] C++11, C++0x
2014 ISO/IEC 14882:2014[26] C++14, C++1y
2017 ISO/IEC 14882:2017[9] C++17, C++1z
2020 In development C++20,[17] C++2a

New features are standardized with each version release.

So, which version should you use?

If you’re just starting to learn, you don’t need to worry too much about this.

The basics remain the same across all versions.

The differences lie in the features. Some functions are added, and others are removed.

For fundamental concepts like variables, if statements, loops, functions, and so on… they are consistent across all versions.

Examples of Applications Built with C++

Numerous applications are built using C++. I’ll mention a few that I’m familiar with:

First, there’s Inkscape, a vector graphics editor similar to CorelDraw and Adobe Illustrator. Inkscape is built with C++ and GTK+ 3.

Second, we have Krita, a digital painting application. Krita is created using C++ and Qt 5.

Besides these two impressive applications, many more are built with C++:

  • Winamp Media Player;
  • MySQL Server;
  • Mozilla Firefox;
  • Thunderbird;
  • Google Chrome;
  • Microsoft Office;
  • Adobe Photoshop;
  • Adobe Illustrator;
  • Java Virtual Machine (JVM);
  • KDE Desktop Environment;
  • Apple macOS UI (Aqua) Desktop Environment;
  • And countless others…

C++ is pretty awesome, isn’t it? 😍

What’s Next?

We’ve now become acquainted with the C++ language and explored its history and origins.

Essentially, C++ is an enhanced version of the C language, capable of creating various programs and applications.

Next, we’ll begin learning C++ programming, but before that… let’s prepare our tools.

Please proceed to:

📖 For a list of other C++ tutorials, see the C++ Tutorial List

Happy learning!

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *