C++ Code Snippets


10 June, 2017   

C++ source code useful string functions

11 May, 2017   

The following code uses bitwise operators to determine if an unsigned integer, x, is a power of two.

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.