C++ Classes & Objects
C++ CLASSES & OBJECTS A class is a mechanism for creating user-defined data types. It is similar to the C language structure data type. In C, a structure is composed of a set of data members. In C++, a class type is like a C structure, except that a class is composed of a set […]
C++ CONSTRUCTORS
C++ Constructors We often want to initialize some or all the member variables for an object when you declare the object. C++ includes special provisions for such initializations. When we define a class, we can define a special kind of member function known as Constructors. A Constructor is a member function that is automatically called […]
C++ DESTRUCTORS
C++ Destructors Similarly to a constructor, A Destructor is a special kind of member function that is automatically called when an object about to destroy. Destructors are usually used to deallocate memory and do another cleanup for a class object and its class members when the object is destroyed. A destructor is called for a […]
C++ Friend Function & Classes
C++ Friend Function & Classes C++ Friend Function & Classes One of the most important concepts of object-oriented programming is data hiding, i.e., a nonmember function cannot access the class object’s related private or protected data. But, sometimes this restriction may force the programmer to write long and complex codes. So, there is a mechanism […]
C++ Introduction
C++ Introduction During the 60s, while computers were still in an early stage of development, many new programming languages appeared. Among them, ALGOL 60, was developed as an alternative to FORTRAN but taking from it some concepts of structured programming which would later inspire most procedural languages, such as CPL and its successors (like C++). […]
inheritance in c++ with example program
What is Inheritance? The basic philosophy behind Object Orientation is to represent things as they exist in the real world. For example, unlike procedural programming languages. C++ treats everything as an object. Like objects exist in the real world, objects in C++ contain properties i.e. members and behavioral attributes i.e. methods. Similarly, another concept has […]
Dynamic memory management
Dynamic memory management Dynamic memory management is basically used to calculate runtime memory requirements. With this, we can not only save the amount of effort needed while developing the program but also saves us from recruiting the entire program. Basically there two major functions namely malloc() and calloc() referred to be dynamic memory management functions. […]
Introduction programming
Introduction Programming As we human beings communicate with each other in different languages such as Urdu, French, Punjabi, and Arabic, etc. Similarly to communicate with the computers we have to use specific languages and for this purpose, hundreds of languages have been developing in which few of them have gained an international reputation. C++ language […]
Introduction to C Programming
Introduction to C Programming C is a high-level structured oriented programming language, used in general-purpose programming, developed by Dennis Ritchie at AT&T Bell Labs, the USA between 1969 and 1973. C Language History The C programming language is a structure-oriented programming language, developed at AT&T Bell Laboratories in 1972 by Dennis Ritchie C programming language […]
Swift Access Control
Swift Access Control Modules are just a bundle of code that is used in other Modules through the import statement. In simpler terms, a Module is just a folder in which you hold your swift files. Access Control handles the restrictions of your code. By defining the access of your classes, functions, properties, enumerations, protocols, […]