What Is C++? (And How to Learn It)

Written by Coursera Staff • Updated on

Discover the programming language C++, what it’s used for, and how to learn it.

[Featured Image] A C++ programmer in white headphones uses two computer monitors to work on code for their job.

C++ is among the top 10 most widely used programming languages in the world [1]. It's a general-purpose programming language (GPL), which means you can use it to build any type of program. The article below further explores the use cases, benefits, and potential drawbacks of C plus-plus. You can use it to determine whether it's the right programming language for you to learn.

What is C plus-plus?

C++ (or “C-plus-plus”) is a generic programming language for building software. It’s an object-oriented language. In other words, it emphasizes using data fields with unique attributes (a.k.a. objects) rather than logic or functions. A common example of an object is a user account on a website. Typically, a user account contains closely related data like first name, last name, and email address. Bundling this information together into an object makes it easy to replicate the process of creating a new account.

Did you know?

Bjarne Stroustrup invented C++ in 1979 to extend C, a procedural programming language. It was designed to offer programmers more control over memory and system resources.

Placeholder

What is C plus-plus used for?

Over time, C++ has become a choice language for building fast and reliable software. Its versatility makes it an excellent match for complex applications, embedded systems, and internet of things (IoT) devices. A few of its most common use cases are as follows:

  • Software engineering. A couple of applications you might use daily that were created with C plus-plus include Netflix and Amazon.

  • Operating system (OS) development. Examples of OS that were created with C++ include Microsoft Windows, Mac OS X, and iOS.

  • Graphical user interfaces. C++ is often recommended for graphical user interface design or, GUI.  

  • Virtual reality (VR). C++ can be an excellent language to learn if you want to develop VR applications.

  • Blockchain technology. The well-known cryptocurrency Bitcoin was developed in C++. It can also be used to create smart contracts.

  • Game development. You can develop games and gaming consoles with C++. For example, the game World of Warcraft and the Xbox console.

Should you learn C++?

C plus-plus is a great language to learn if you want to gain a deep understanding of how computers work. It's generally considered to be a good starting point for novice or beginner coders. With knowledge of C++, you may also be able to pick up other languages like Python or JavaScript more easily.

Read more: Python vs. C++: Which to Learn First and Where to Start

Advantages of learning C++

Programming in C++ offers several advantages. Because it is object oriented, you can easily organize and classify the code. Instead of rewriting code from scratch, you can reuse it. You can also use C plus-plus to interact directly with a computer’s hardware. As a result, you'll be able to control how a system uses its computational resources, like software, hardware, and memory. 

Read more: Should You Learn Object-Oriented Programming Languages?

Career advancement opportunities

Having experience with C++ can introduce you to job opportunities with high-paying salaries. As of January 2023, Indeed had over 13,000 job listings in the US for C++ developers, programmers, and engineers. Over 8,000 of those jobs are estimated to have salaries above $110,000 [2]. Glassdoor reports that the average yearly pay for C++ developers in the US is $108,260 [3].

Read more: How to Become a Software Developer | 9 Tips

How to learn C++

C++ basics include storing information, repeating actions through loops, and collecting user input. The list below outlines a few key concepts for C++ beginners to explore. Then, check out the next section for recommendations on where to start.

  • Conditionals like “if statements,” “if else statements,” and “switch case statements,” which tell a computer what to do under certain conditions 

  • How to assign classes to objects (data fields with unique attributes) 

  • How to write code using C++ syntax, the predefined symbols, and characters that determine how a computer reads the code  

  • How to compile and link a C++ file, so that the code can run on a machine 

Online courses and guided projects in C++

Here are a few beginner-friendly online courses and guided projects to get you started:

You can practice also basic C++ with exercises like printing “Hello, World,” converting Celcius to Fahrenheit, and performing arithmetic operations.

Joining the C++ developer community

It can be helpful to connect with and learn from other, more experienced programmers. For example, you may consider joining the C++ Slack community. Or, follow questions with the C++ tag on StackExchange. You can also follow relevant YouTube channels like Programming with Mosh. Once you've gained some technical expertise and practiced coding in C plus-plus on your own, you might be ready to apply your skills to a real-life project on a collaborative site like GitHub.

Learn C++ with Coursera

Start building a strong foundation for your programming career today by enrolling in an introductory online course like Coding for Everyone: C and C++ Specialization by the University of California Santa Cruz.

Frequently Asked Questions (FAQ)

Article sources

1

Statista. "Most used programming languages among developers worldwide as of 2022, https://www.statista.com/statistics/793628/worldwide-developer-survey-most-used-languages/#:~:text=As%20of%202022%2C%20JavaScript%20and,55%20percent%20using%20HTML%2FCSS." Accessed January 11, 2023.

Keep reading

Updated on
Written by:

Editorial Team

Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.