C++ Code Snippets

C++ source code for singly linked list - insert, remove, add, count

01 August, 2016   

3 Examples way to do a swap

Function of an integer raised in a power * and the calculation of the sum of a series of integers

Source code by Maganti Venkatesh for another way to swap 2 numbers

A Template for building OpenGL applications using GLUT.

16 May, 2016   

Example source code Friend Function

Source code for Validate Longitudinal Redundancy Checksum

C++ code example to calculate 1 variable statistics

22 February, 2016   

C/C++ source code for euler approximation method

Function of an integer raised in a power * and the calculation of the sum of a series of integers (1^e+2^e....+n^e) raised in a power.

* Code to generate spiral matrix for n elements where n >= 1 * To generate spiral matrix for n elements just * Change the value of MAX to whatever u want :)

22 November, 2015   

To print out all possible subsets in lexicographic order

Converts the given floating-point value to a zero-terminated string. The supplied buffer should be large enough to accommodate the converted value. The value includes a decimal point and possiblesign and exponent information, plus a terminating null character, which is appended automatically. Returns: a pointer to zero-terminated...

C++ Example code to convert a real number to the string

C++ code snippet for function pointer to member function of class

This simple program shows the size and ability of primitive data types to handle minimum and maximum values, to take care about it, while you write a program.

26 August, 2015   

A program which gives a lexigraphic permutation generator.

Calculate the more near point belonging to a given segment.

08 July, 2015   

Source code for a game setup for DirectX

This function is used to reverse an integer array. For example, if the array is {1,2,3,4,5}, these functions will return an array like {5,4,3,2,1}. The user needs to pass in a pointer to the array and the size of the array, and the function will return a pointer to an array in the reverse order.