C++ Programming Code Examples
C++ > Visual C++ 5.0 Standard C++ Library Code Examples
Algorithm max - Returns the maximum of the two items.
C++ program for Complex Numbers using -
Class for addition, subtraction, multiplication and division for 'complex numbers'. Class has 4 functions to perform arithmetic operations. It takes 2 "complex numbers" input from user
C Number of Occurrences of an Element in -
Code Count the number of Occurrences of an element in the linked list using recursion. This C Program uses recursive function & finds the occurrence for an element in an Unsorted list.
C++ Codings Quick Sort & Randomization -
Quick sort is based on an 'algorithmic' design pattern called 'divide-conquer'. Unlike Merge Sort it does not require 'extra memory space'. The average time complexity is "O(n*log(n))"
A destructor is a Special Member Function -
In C++, Name should begin with tilde sign(~) and must match class name. There cannot be more than one "Destructor" in a class. Unlike "constructors" that can have parameters, and
C++ Converting Fahrenheit to Centigrade -
To convert temperature from "Fahrenheit" to centigrade in C++, enter the "temperature" in Fahrenheit to convert it to centigrade to print equivalent temperature value in "centigrade"
Implements Max-Flow Min-Cut Theorem -
Program demonstrates implementation of max-flow_min-cut_theorem. So returns true if there is a 'path from source' 's' to sink 't' in residual graph. Also fills parent[] to store the
All-Pairs Algorithm by C++ Test Programs -
Compute all-shortest paths. a[][]contains the adjacency matrix with 'a[i][i]' presumed to be zero. d[ ] contains the values of the 'shortest path'. Vertices are numbered starting at 0; all
C++ Sample Code Make Simple Calculator -
To make a simple calculator in the C++, which performs basic four mathematical operations (addition, subtraction, multiplicatin, division) depending on the "user's choice", switch case