RSS Feed

C

Error Lnk2019

Error Lnk2019

The C++ programming language has become one of the most popular general purpose programming languages taught in schools and used in industry. Its ability to allow programmers to create object oriented programs and tie in to low level constructs, has made it one of the most powerful languages available to developers over the past several decades.

Error c2664

Error c2664

C++ supports both implicit and explicit type casting of variables. Error c2664 is displayed while developing C++ when an incompatible conversion is encountered. This can occur if a class is created and an implicit constructor conversion is attempted while an explicit keyword is in the code statement.

Functions – Pass by value

Functions – Pass by value

Functions
A function is a named unit of a group of program statements. This unit can be invoked from other parts of the program. A programmer can solve a simple problem in C++ with a single function. Difficult and complex problems can be decomposed into sub-problems, each of which can be either coded directly or further decomposed.

Arrays

Arrays

An array is a collection of C or C++ data elements or objects of the same type. Individual elements of an array are referenced using one or more integer indices. A one-dimensional array is defined with a statement such as double vector[50]. This defines (and allocates space for) 50 variables of type double that are contiguously located in storage.

Heaps

Heaps

A heap is a binary tree that satisfies the following properties:

Shape property

Order property

By the shape property, we mean that a heap must be a complete binary tree. A complete binary tree has all its levels filled, except possibly for the last, where the leaves must be located as far to the left as possible.

Iterations

Iterations

An Iteration involves repeating some portion of a program, a specified number of time or until a particular condition is satisfied. This repetitive operation in C and C++ is achieved through for, while and do-while loop.
How does a for loop work?
A for loop is the easiest iteration loop to understand the C and C++ loops.

Merge Sort

Merge Sort

Merging means combining elements of two arrays to form a new array. The simplest way of merging two arrays is to first copy all the elements of one array into a new array and then append all the elements of the second array to the new array. If you want the resultant array to be sorted, you can sort it by any of the sorting techniques.

Postfix

Postfix

The sum of X and Y is written as X+Y where + is the operator while X and Y are the operands. We have always learnt to write the sum of two numbers as X + Y; this notation is know as infix. Here, we’ll be talking about the postfix notation of representing arithmetic operations.

Binary Search

Binary Search

This method works on sorted lists by progressively making better guesses to find the location of a search key.

Queues

Queues

A queue is a line of persons waiting for their turn at some service counter. The service counter can be a ticketing window of a cinema hall, a railway station, etc. Depending on the type of service provided by the service counter and number of persons interested in service, there could be queues of varying lengths.