cpp

C++ Language -- should I learn it?

pld208

Patrice Williams

Posted on March 8, 2021

C++ Language -- should I learn it?

What is C++?

My journey to becoming a full stack web-developer is coming to an end. I am in the last month of my Coding Boot Camp and have started to browse job postings and kept coming across experience wanted in C++. This led me to do a little digging and discover what exactly C++ programming language is. C++, an object-oriented language was designed in 1979 by Bjarne Stroustrup to be an extension of the C language. C++ is similar to C, like having classes, inheritance, and default function arguments. C++ is used in various capacities such as operating systems, web browsers, and databases. It is also critical in areas related to performance due to its speed.

The Benefits of C++?

Alt Text

  • C++ is an extremely popular programming language worldwide. C++ is utilized by over 4.4 million developers. The average base pay for a C++ programmer is $103,035 per year.
  • C++ has a great library, the Standard Template Library (STL), which helps to write compact code quickly. There are four components in the library: algorithms, containers, functions, and iterators. The algorithms contain different types, like sorting and searching etc. The containers hold classes to apply various data structures (stacks, queues, hash tables, vectors, sets, lists, maps etc. The functor class acts like a function and allows for customization after parameters are passed in. Lastly, the iterators are used when you’ve got a sequence of values
  • C++ has a vast online community with experts willing to give advice/support. There’s a multitude of resources available on the internet, like StackOverflow, GeeksforGeeks, Standard C++ etc.
  • MySQL, MongoDB and MemSQL are just a few of the databases that are written in C++. This is because C++ supports features like exceptions, lambda expressions etc. Many databases that are written in C++ are used in Enterprises like WordPress, Twitter, and Facebook
  • Windows, Linux, Android, Ubuntu, iOS and other major operating systems are written in a combination of C and C++. C and C++ are used in operating systems due to their “speed and the strongly typed nature of these languages” (GeeksforGeeks).
  • C++ is utilized in many compilers as a backend programming language. This is because C++ is more so on the level of hardware and is considered a low-level language. For example, the GNU Compiler Collection (GCC) is written in mostly C++ along with C.
  • C++ high speed makes it a great choice for applications that require graphics, like digital imaging processing, computer vision, and screen recording programs
  • C++ is beneficial for embedded systems because it can be used as the software and hardware. Some of these embedded systems that employ C++ include smart watches, MP3 players, GPS systems etc.
  • C++ is portable, it can be moved across platforms. This makes it attractive for applications requiring multi-device development.

C++ Hello World App

In C++, the file should be saved with the name of the file and end with “.cpp”

#include <iostream>
using namespace std;

int main() {
  cout << "Hello World!";
  return 0;
}
Enter fullscreen mode Exit fullscreen mode

The first line of code “#include ” is a header file library that allows you to work with input and output objects, like cout. The second line, “using namespace std” means that names for objects and variables are free to use from the standard library. These two lines will almost always appear in your program. C++ ignores white space for the third line. “Int main()” is a function and any code between the curly brackets {} will be executed. “Cout” is an object that is used with the insertion operator (<<) to output text. In this example, the output is “Hello World!” The return 0 ends the main function. Do not forget the ending semicolon “;” and “}” to end the main function.
 
C++ is a popular programming language that can be found in many of today’s operating systems. C++ gives structure to programs and allows code to be reused, which lowers development costs. C++’s portability and great support/resources make it a language that you should consider learning.

Works Cited

W3 Schools. (n.d.). C++ getting started. Retrieved March 08, 2021, from https://www.w3schools.com/cpp/cpp_getstarted.asp
Geeksforgeeks. (2019, May 22). Top 10 reasons to learn C++. Retrieved March 08, 2021, from https://www.geeksforgeeks.org/top-10-reasons-to-learn-c-plus-plus/

💖 💪 🙅 🚩
pld208
Patrice Williams

Posted on March 8, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related