The ABC's of C++: A Complete Road map

The ABC's of C++: A Complete Road map

ยท

6 min read

Hello World ๐Ÿ‘‹

In this blog, we will be covering a complete roadmap to learn CPP (C++).

C++ is a programming language developed by Bjarne Stroustrup in 1979 at Bell Labs. C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It is a superset of C, and virtually any legal C program is a legal C++ program. C++ runs on a variety of platforms, such as Windows, Mac OS, and on the various versions of UNIX. It has the following features:

  • Statically typed
  • Complied
  • General-purpose
  • Case Sensitive
  • Procedural programming
  • Object-Oriented Programming (OOP)
  • Generic Programming

Why C++?

  • C++ has the Standard Template Library(STL) that is very useful as it helps in writing code compactly and quickly as required. It contains mainly four components i.e. algorithms, containers, functions, and iterators.
  • Major databases, Operating Systems, web browsers, and many portable software are written in C++.
  • Most preferred language for competitive programming.
  • There is a large online community of C++ users and experts that is particularly helpful in case any support is required.

Getting started with C++

To start using C++, you need two things:

  • A text editor, like Notepad, to write C++ code
  • A compiler, like GCC, to translate the C++ code into a language that the computer will understand.

You can use any IDE also like devc++, turboc++, Code::Blocks.

Note: For Code::Blocks download the "MinGW-setup.exe" file, which will install the text editor with a compiler.

For editor, you can also opt for notepad++, Sublime Text, Visual Studio Code, etc.

Learning Flow of C++

This section is divided into 8 modules

Module 1: Basic Concepts

  • Start with the hello world program
  • Get an understanding of headers and namespaces
  • Know about New lines and comments
  • Get friendly with variables and their types
  • Lastly operators mainly assign and increment.

Module 2: Conditionals and loops

  • First, learn about conditionals: if, if-else, if-else-if.
  • Switch statement
  • Now loop backbone for programming: while, for, do-while.
  • Get yourself comfortable with logical operators.

Module 3: Data Types, Arrays, Pointers

  • Learn about different data types int, float, char, string, bool, double.
  • Rules for naming a variable.
  • Get start with array 1-D Array and its calculations.
  • Go for Multi-Dimensional Array.
  • Start with pointers, addressing, Dynamic memory.
  • sizeof() operator.

Module 4: Functions

  • Introduction to function
  • Functions parameter and multiple parameters
  • Default argument
  • Function overloading
  • Recursion
  • Pass array to function
  • Pass by reference with pointers

Module 5: Classes and Objects

  • What are class and objects?
  • Abstraction
  • Encapsulation
  • Constructors and Destructors
  • Selection operators
  • const Object
  • Member initializer
  • Friend and this keyword
  • Operator overloading

Module 6: Inheritance and Polymorphism

  • What is inheritance?
  • Protected members
  • Derived Class constructor and Destructor
  • Polymorphism
  • Virtual function
  • Abstract Classes

Module 7: Templates, Exception, and Files

  • Function Templates
  • Function Templates with multiple parameters
  • Class template
  • Template specialization
  • Exceptions
  • Working with files

Note: Module 8 is for competitive programming.

Module 8: STL (Standard Template Library)

  • Vector
  • Stack
  • Queue and deque
  • Map, multimap, and unordered map
  • Priority queue
  • Set and unordered set

Wrap Up

C++ is considered as a middle language between C# and java. By starting off with these modules and mastering them with time, you can easily write code in C++ and understand any other code too. You can also switch or understand other programming languages quickly once you get comfortable with C++. It is the most widely used language for competitive programming.

#Happy_Coding ๐Ÿ’ป

Thank you for reading the article. Follow CodoPedia for More. ๐Ÿ˜ƒ

For regular updates and more interesting stuff join our telegram community here Telegram