• 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++ Classes

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

Write a C++ program Illustrates virtual base classes.

By Dinesh Thakur

[Read more…] about Write a C++ program Illustrates virtual base classes.

Write a C++ program illustrates copy constructor.

By Dinesh Thakur

[Read more…] about Write a C++ program illustrates copy constructor.

Write a C++ program illustrates Abstract class and Pure virtual function.

By Dinesh Thakur

[Read more…] about Write a C++ program illustrates Abstract class and Pure virtual function.

Write a C++ Program of Virtual Function

By Dinesh Thakur

[Read more…] about Write a C++ Program of Virtual Function

Virtual Function in C++

By Dinesh Thakur

We know that runtime polymorphism is achieved when the objects of different classes in the class hierarchy respond to the same function call each in its way. To invoke same-named functions present both in the base and derived classes using a single interface. But we found that it still could not execute the derived class’s functions and executed the same-named function defined in the base class. Thus it could not achieve polymorphism. To implement polymorphism for invoking the exact version of the same-named member functions in the class hierarchy, we use virtual functions. [Read more…] about Virtual Function in C++

Pointer to C++ classes

By Dinesh Thakur

Virtual functions play an important role in object oriented programming. Ordinary functions use the concept of early binding. However virtual functions help in late binding. The concept of pointers playa vital role in Virtual functions. [Read more…] about Pointer to C++ classes

Write a C++ program for prototype constructors.

By Dinesh Thakur

[Read more…] about Write a C++ program for prototype constructors.

What is Destructor in C++

By Dinesh Thakur

Every object of a class created in a program is stored somewhere in the memory. This memory is automatically deallocated when the object is destroyed. A constructor allocates resources dynamic memory) to an object during its creation in addition to its property of initialization. Similarly, we should have a member function that deallocates the resources (dynamic memory) allocated to an object. Such counterpart (complement) to the constructor is called a Destructor in C++. [Read more…] about What is Destructor in C++

Write a C++ Program for Array of Object.

By Dinesh Thakur

[Read more…] about Write a C++ Program for Array of Object.

Write a C++ Program for Memory allocation for a class

By Dinesh Thakur

The member functions are created and placed in the memory space only once when they are defined as a part of a class specification. Since· all the objects belonging to that class use the same member functions, no separate space is allocated for member functions when the objects are created. For each object, memory is allocated only for member data. Separate memory locations for the objects are essential since the member variables hold different data values for different objects. [Read more…] about Write a C++ Program for Memory allocation for a class

Write a C++ Illustrates multiple objects for a class.

By Dinesh Thakur

[Read more…] about Write a C++ Illustrates multiple objects for a class.

How to Accessing members of a class in C++

By Dinesh Thakur

Member of a class can be accessed only through the object of a class. The members are accessed as follows: [Read more…] about How to Accessing members of a class in C++

Difference between Structures and Classes in C++

By Dinesh Thakur

The difference between a structure and a class is that, in a class, the member data or functions are private by default whereas, in a structure, they are public by default. The following segment [Read more…] about Difference between Structures and Classes in C++

const Member Functions c++

By Dinesh Thakur

The const qualifier is used with the variables of basic data types to prevent them from being modified by the function. In a similar way, const qualifier can also be applied to member functions, member function arguments and the objects of a class. [Read more…] about const Member Functions c++

c++ – Returning object from function

By Dinesh Thakur

A function can also return objects either by value or by reference. When an object is returned by value from a function, a temporary object is created within the function, which holds the return value. This value is further assigned to another object in the calling function. [Read more…] about c++ – Returning object from function

Objects as Function Arguments in c++

By Dinesh Thakur

The objects of a class can be passed as arguments to member functions as well as nonmember functions either by value or by reference. When an object is passed by value, a copy of the actual object is created inside the function. This copy is destroyed when the function terminates. Moreover, any changes made to the copy of the object inside the function are not reflected in the actual object. On the other hand, in pass by reference, only a reference to that object (not the entire object) is passed to the function. Thus, the changes made to the object within the function are also reflected in the actual object. [Read more…] about Objects as Function Arguments in c++

Array of Objects in c++

By Dinesh Thakur

Like array of other user-defined data types, an array of type class can also be created. The array of type class contains the objects of the class as its individual elements. Thus, an array of a class type is also known as an array of objects. An array of objects is declared in the same way as an array of any built-in data type. [Read more…] about Array of Objects in c++

Arrays as Class Members in C++

By Dinesh Thakur

Arrays can be declared as the members of a class. The arrays can be declared as private, public or protected members of the class. [Read more…] about Arrays as Class Members in C++

Accessing Public and private members of C++ classes

By Dinesh Thakur

The members of a class can be directly accessed inside the class using their names. However, accessing a member outside the class depends on its access specifier. The access specifier not only determines the part of the program where the member is accessible, but also how it is accessible in the program. [Read more…] about Accessing Public and private members of C++ classes

How to Creating Objects and Allocate Memory for Objects in c++

By Dinesh Thakur

Once a class is defined, it can be used to create variables of its type known as objects. The relation between an object and a class is the same as that of a variable and its data type. [Read more…] about How to Creating Objects and Allocate Memory for Objects in c++

c++ – Defining member functions inside or outside the class definition

By Dinesh Thakur

Member functions of a class can be defined either outside the class definition or inside the class definition. In both the cases, the function body remains the same, however, the function header is different. [Read more…] about c++ – Defining member functions inside or outside the class definition

What is Class in C++

By Dinesh Thakur

A class in C++ is a user-defined data type that binds data and the functions that operate on the data together in a single unit. Like other user-defined data types, it also needs to be defined before using its objects in the program. A class definition specifies a new data type that can be treated as a built-in data type. [Read more…] about What is Class in C++

What is Polymorphism?

By Dinesh Thakur

Polymorphism (a Greek word meaning having multiple forms) is the ability of an entity such as a function or a message to be processed in more than one form. It can also be defined as the property of an object belonging to a same or different class to respond to the same message or function in a different way. For example, if a message change_gear is passed to all the vehicles then the automobiles will respond to the message appropriately however, the pulled vehicles will not respond. The concept of polymorphism plays an important role in OOP as it allows an entity to be represented in various forms. [Read more…] about What is Polymorphism?

What is Abstraction? Explain Type of Abstraction.

By Dinesh Thakur

Abstraction is a mechanism to’ hide irrelevant details and represent only the essential features so that one can focus on important things at a time; It allows managing complex systems by concentrating on the essential features only. For example, while driving a car, a driver only knows the essential features to drive a car such as how to use clutch, brake, accelerator, gears, steering, etc., and least bothers about the internal details of the car like motor, engine, wiring, etc. [Read more…] about What is Abstraction? Explain Type of Abstraction.

Write a C++ program to Overloaded ++operator in both prefix and postfix.

By Dinesh Thakur

[Read more…] about Write a C++ program to Overloaded ++operator in both prefix and postfix.

Write a C++ program to increment time variable with ++operator.

By Dinesh Thakur

[Read more…] about Write a C++ program to increment time variable with ++operator.

Write a C++ program to Operator Overloading Using a Friend Function.

By Dinesh Thakur

A feature of some programming languages in which the same 0PERATORmay be used on different data types with different, but analogous, results. For example most languages permit the same operator + to add either INTEGER or FLOATING-POINT numbers, and many further allow it to be used to CONCATENATE strings, so that ‘rag’ + ‘mop’ produces ‘ragmop’. A few languages, including C++, allow the programmer to create new operator overloading. [Read more…] about Write a C++ program to Operator Overloading Using a Friend Function.

Write a C++ program for friend operator.

By Dinesh Thakur

[Read more…] about Write a C++ program for friend operator.

Write a C++ program to Make op-, ++, = a friend; use reference.

By Dinesh Thakur

[Read more…] about Write a C++ program to Make op-, ++, = a friend; use reference.

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