• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » C++ » C++ Programming

The C++ Standard Template Library (STL)

By Dinesh Thakur

In this tutorial, We’ll be talking about STL, so an STL stands for standard template library.

We know that to store data in memory, we need a data structure to store data in primary memory. We need data structure for its implementation in a code. We need some easy approach, like if you are from a C language background, to implement it, we need Stack, Queue, LinkedList, or any data structure, but in C++ due to STL. It helps you to implement those data structures in your code with one line. [Read more…] about The C++ Standard Template Library (STL)

Manipulators in C++

By Dinesh Thakur

The unformatted I/O statements that it is impossible to display output in a required user format or input the values in the desired form. In certain situations, we may need to format the I/O as per user requirements. For example :

1) The square root of a number should be displayed upto 2 decimal places.
2) The number to be inputted must be in a hexadecimal form.

To overcome the problems of unformatted I/O operations in C++, the concept of manipulators was introduced. [Read more…] about Manipulators in C++

Pointer in C++

By Dinesh Thakur

A pointer in C++ is a variable that contains the address of another variable in memory. Suppose i is an integer variable having value 10 stored at address 2202 and the address of i is assigned to variable j, then j is a pointer variable pointing to the memory address stored in it. In other words, j is a pointer variable containing the address of i (i.e. 2002). [Read more…] about Pointer in C++

Hybrid Inheritance in C++

By Dinesh Thakur

In some situations, it is essential to design a program using two or more forms of Inheritance. Combining two or more forms of Inheritance to design a program is known as Hybrid Inheritance in C++. Such a form of Inheritance represents a complex class hierarchy. The following figures show some possible representations of hybrid inheritance. [Read more…] about Hybrid Inheritance in C++

Constructor Overloading in C++

By Dinesh Thakur

The constructor is key for object initialization. The mechanism of the constructor is made considerably more powerful by combining with the feature of overloading. It is made possible by providing more than one constructor in a class. It is called constructor overloading. [Read more…] about Constructor Overloading in C++

String in C++

By Dinesh Thakur

Just like a group of integers can be stored in an integer array. Similarly, a group of characters can also be stored in a character array. This array of characters is known as a string. Strings are used for storing and manipulating text such as words and sentences.

A string in C++ is a collection of characters terminated by a null character (‘\0’), specifying where the string terminates in memory. A string can be represented as a one-dimensional char type array where each string’s character is stored as an element of the array. For example: “Try Again” is a string constant stored in memory, as shown below figure. [Read more…] about String in C++

Multiple Inheritance in C++

By Dinesh Thakur

So far, we have been deriving a class from a single base class. However, it is also possible to derive a class from two or more unreleased base classes. When we derive a class from two or more base classes, this form of inheritance is known as Multiple Inheritance in C++. It allows the new class to inherit the functionality of two or more well developed and tested base classes, thus reusing predefined classes’ features. Like Single Inheritance, each derived class in multiple inheritances must have a kind of relationship with its base classes. This form of inheritance is useful in those situations in which the derived class represents a combination of features from two or more base classes. For Example: In an educational institute, a member can act like a teacher and a student. He may be a student of higher class as well as teaching lower classes. [Read more…] about Multiple Inheritance in C++

Linked List in C++

By Dinesh Thakur

A Linked List in C++ is a dynamic data structure that grows and shrinks in size when the elements are inserted or removed. In other words, memory allocated or de-allocated only when the elements are inserted or removed. Thus, it means that no memory is allocated for the list if there is no element in the list. An element can be inserted and removed in the linked list at any position. [Read more…] about Linked List in C++

Copy Constructor in C++

By Dinesh Thakur

Whenever an object is defined and initialized with some values of basic data types passed as arguments. For example : [Read more…] about Copy Constructor in C++

Templates in C++

By Dinesh Thakur

We have studied the concept of function overloading, in which we use the same name for various implementations of the function. The overloaded functions are distinguished utilizing the different parameter lists. In function overloading, it may be possible that multiple functions’ performance is identical except for the type of data they operate upon. The problem with function overloading is that in the program, we have to define a separate function for each data type but also if any new type is added later on, then new functions have to be written for each one. [Read more…] about Templates in C++

Polymorphism in C++

By Dinesh Thakur

Polymorphism is a compelling concept that allows the design of an amazingly flexible application. The word Polymorphism is derived from two Greek words Poly which means many, and morphos which means forms. So, Polymorphism means the ability to take many forms. [Read more…] about Polymorphism in C++

do-while Loop in C++

By Dinesh Thakur

The do-while loop in C++ is similar to the while loop except that its test condition is evaluated at the end of the loop instead of at the beginning as in the while loop. So in the do-while, the body of the loop always executes atleast once, even if the test condition evaluates to false during the first iteration (pass). If the test condition evaluates to TRUE, the body of the loop is executed. It keeps on executing until the test condition is FALSE and then control transfer to the next executable statement following the do-while loop. [Read more…] about do-while Loop in C++

Exception Handling in c++

By Dinesh Thakur

The errors that occur at run-time are known as exceptions. They occur due to different conditions such as division by zero, accessing an element out of bounds of an array, unable to open a file, running out of memory and many more. All these errors are synchronous exceptions. There is another type of exception known as an asynchronous exception that deals with errors associated with events like disk I/O completion, mouse click, network message arrivals etc. For handling such exceptional situations, an error handling mechanism known as Exception Handling is provided. In C++, exception handling is designed to handle only synchronized exceptions. [Read more…] about Exception Handling in c++

Operator Overloading in C++

By Dinesh Thakur

Like function overloading, C++ also support a powerful concept called operator overloading. C++ contains a rich set of operators such as +,-, *, >>, <,++ etc., which work on built-in types such as int, float, char to perform arithmetic, relational, logical and various other operations. Let us consider the statement c = a+b;. Here, the + operator can be used to perform add operation on operands a and b, either int, float, double types, etc. Thus, the + operator performs multiple tasks as it can perform addition of any of the built-in types and hence already overloaded. The compiler has prior knowledge about how to perform this add operation on built-in types. However, if a, b, c are variables (objects) of a user-defined type (class), then the statement c=a+b; will not work as the compiler doesn’t understand how to add variables (objects) of a user-defined type (class). [Read more…] about Operator Overloading in C++

this pointer in C++

By Dinesh Thakur

Whenever we call a member function in association with an object, the object’s address is implicitly passed as a hidden first argument received in the called member function using a special pointer known as this pointer. The this pointer contains the address of the object that generates the call. It is implicitly defined in each member function, and its data type is that of a pointer to the class type. [Read more…] about this pointer in C++

What is Vector in C++ with example?

By Dinesh Thakur

Vectors in C++ are the same as dynamic arrays and will dynamically resize themselves as an element is added or removed. Vectors implemented to handle a variety of elements at a time, so that the size of a vector may vary, while array classes have a fixed size. Vector elements are put in contiguous storage for accessed and traverse using iterators.

Vector insertion is not always constant. When we insert an element at the end of the vector if a vector is full, it takes time to resize and time to insert an element just when it inserted at the end. Therefore the insertion time is not always constant. Vectors have a dynamic size. They have placed in contiguous memory for easy access. [Read more…] about What is Vector in C++ with example?

C++ Classes

C++ Inheritance

C++ Array and Pointer

C++ Functions

C++ Control Structure

C++ Operator

C++ Oops

C++ Programming

What is Parallel Programming?

By Dinesh Thakur

The creation of programs to be executed by more than one processor at the same time. Parallel programming is more difficult than ordinary SEQUENTIAL programming because of the added problem of synchronization. A sequential program has only a single FLOW OF CONTROL and runs until it stops, whereas a parallel program spawns many CONCURRENT processes and the order in which they complete affects the overall result. [Read more…] about What is Parallel Programming?

What is Object-Oriented?

By Dinesh Thakur

Any computer program built by combining many self-contained software structures called OBJECTS, instead of writing a single long list of instructions. Objects have both properties and behaviour, which makes them powerful tools for modelling events and processes in the real world. Each object possesses its own private data describing its properties (e.g. ‘size’, ‘colour’) and also a collection of private subprograms, called METHODS (e.g. ‘print’, ‘display’, ‘move’) for manipulating that data. The set of methods that an object understands is called its INTERFACE, and is the only means by which one object is allowed to interact with other. [Read more…] about What is Object-Oriented?

What is OOPL (Object oriented programming language)?

By Dinesh Thakur

(OOPL) A programming language specifically designed to support the writing of OBJECT-ORIENTED programs. Such languages typically support three features not found in traditional programming languages: CLASSES, ENCAPSULATION and INHERITANCE, though the actual constructs that embody these features may have different names in different languages. The first such OOPL to be invented was SIMULA, and the most widely used OOPL today is C++, which is a derivative of the C language with added object-oriented features. Other important OOPLs include JAVA, OBJECT PASCAL, EIFFEL, and the historically important SMALLTALK. [Read more…] about What is OOPL (Object oriented programming language)?

What is OOP(object-oriented programming)?

By Dinesh Thakur

OOP stands for object-oriented programming, a relatively recent development in programming technology. In traditional computer programs, the procedures (the programming commands) that get things done are separated from the data they work on. By contrast, object -oriented programs are put together from building blocks called objects; each of these self-contained software modules includes all the commands and data needed to do a given set of tasks when it receives the right “messages.” Because it is “encapsulated” in this way, an object can be reused as a unit in as many programs as needed. By design, OOP makes it easy to generate new objects that automatically “inherit” the capabilities of existing objects. The programmer can then modify a function or two or add some new ones, but she doesn’t have to start from scratch. [Read more…] about What is OOP(object-oriented programming)?

Abstract Data Type – What is an Abstract Data Type (ADT)?

By Dinesh Thakur

An abstraction is a simplified description, or specification, of a system that focuses on some essential structure or behavior of a real-world or conceptual object. A good abstraction is one in which information that is significant to the user is emphasized while details that are immaterial, at least for the moment, are suppressed. We use the principles of information hiding to encapsulate these details. [Read more…] about Abstract Data Type – What is an Abstract Data Type (ADT)?

Write a C++ program illustrates the use of this pointer

By Dinesh Thakur

[Read more…] about Write a C++ program illustrates the use of this pointer

Next Page »

Primary Sidebar

C++ Tutorials

C++ Tutorials

  • C++ - Data Types
  • C++ - Operators Types
  • C++ - CPP Program Structure
  • C++ - Conditional Statements
  • C++ - Loop
  • C++ - do-While Loop
  • C++ - Control Statements
  • C++ - Tokens
  • C++ - Jump Statements
  • C++ - Expressions
  • C++ - Constants
  • C++ - Character Set
  • C++ - Iteration Statements
  • C++ - I/O Statements
  • C++ - String
  • C++ - Manipulators

C++ Operator

  • C++ - Input/Output Operator
  • C++ - Operator Overloading

C++ Functions

  • C++ - Functions
  • C++ - Member Functions
  • C++ - Returning Object from Function
  • C++ - Call by Value Vs Reference
  • C++ - Friend Function
  • C++ - Virtual Function
  • C++ - Inline Function
  • C++ - Static Data Members
  • C++ - Static Member Functions

C++ Array & Pointer

  • C++ - Array
  • C++ - Array of Objects
  • C++ - Arrays as Class Members
  • C++ - Vector
  • C++ - Pointer
  • C++ - 'this' Pointer

C++ Classes & Objects

  • C++ - Class
  • C++ - Program Structure With Classes
  • C++ - OOP’s
  • C++ - Objects as Function Arguments
  • C++ - Procedure Vs OOL
  • C++ - Object Vs Class
  • C++ - Creating Objects
  • C++ - Constructors
  • C++ - Copy Constructor
  • C++ - Constructor Overloading
  • C++ - Destructor
  • C++ - Polymorphism
  • C++ - Virtual Base Class
  • C++ - Encapsulation

C++ Inheritance

  • C++ - Inheritance
  • C++ - Multiple Inheritance
  • C++ - Hybrid Inheritance
  • C++ - Abstraction
  • C++ - Overloading

C++ Exception Handling

  • C++ - Exception Handling
  • C++ - Templates
  • C++ - Standard Template Library

C++ Data Structure

  • C++ - Link List

C++ Programs

  • C++ Program for Electricity Bill
  • C++ Program for Multiply Matrices
  • C++ Program for Arithmetic Operators
  • C++ Program For Matrices
  • C++ Program for Constructor
  • C++ Program Verify Number
  • C++ Program Array Of Structure
  • C++ Program to find Average Marks
  • C++ Program Add And Subtract Matrices
  • C++ Program Menu Driven
  • C++ Program To Simple Interest
  • C++ Program To Find Average
  • C++ program exit()
  • C++ Program Using Array Of Objects
  • C++ Program Private Member Function
  • C++ Program To Reverse A String
  • C++ Program to Operator Overloading

Other Links

  • C++ - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW