C++ Tutorials

Bitwise operation using bitwise operators

In this tutorial we will explore the power of bitwise operators in C/C++ programming with examples. Have you ever thought how your email passwords are made secure? Well its done using encryption technique using one of the most advanced and non-reversible encryption algorithm, Md5 encryption. And yes they use bitwise operators. Bitwise operators are infact the most interesting part of programming and coders just love to play with bitwise operators. Many complicated programming algos like cryptography algos make use of bitwise operation.

Read More

C++ Tutorials

SUDOKU Solver

Almost everyone of you might have one or the other time stuck upon a SUDOKU. Here’s a simple C/C++ SUDOKU program that solves the hardest of the Sudoku puzzles  in fraction of a second.

SUDOKU – THE GAME

A Sudoku in the most common form consists of a 9 x 9 grid of numbers. The grid is subdivided into 9 blocks of  3 x 3  size. Initially the grid is partially filled (with numbers from 1-9), your task is to complete the grid using numbers from 1-9 such that

Read More

  • -no row/column contains a repeating digit
  • -no sub block contains repeating digit
C++ Tutorials

Minesweeper - using OpenGl with C++

Minesweeper is a very popular computer game on Windows and other platforms. The board is divided into a grid of 10 X 10 tiles. Each of the tile is covered in the begining. Ten of these tiles
contain mines. Your aim is to uncover all the tiles without mines and detonate all the mines.

This minesweeper game [tutorial] has been coded in ANSI C++ (using MingW through CodeBlocks) and uses OpenGL graphicsTo avoid problems we suggest you to use the above tools only.

Read More

C++ Tutorials

Constructors and Destructors

 Constructors and destructors in C++

Classes provide a special way of initializing objects – through the use of constructors. Similarly certain commands can be exeuted before any object is deleted- this is done via destructors.

Read More

C++ Tutorials

Classes

In this tutorial we will learn about Classes and its use in C++. Classes form one of the major features that powers C++.

  • It is mechanism of packaging data of different types alongwith their functions. 
  • Classes is a derived data type (like structures), it contains members of other data types and also associated functions.

Classes are in many respects similar to structures, but they have the added capability to also contain functions to operate upon the data members.

Read More

C++ Tutorials

Functions in C++ - Advanced features

The method and concepts discussed in the first tutorial on functions (C tutorials) hold equally true for C++ as well. However C++ functions supports some additional features as well. This tutorial deals with advance C++ function features.

Call by reference : Apart from the method discussed in the first tutorial (highlighing the use of pointer arguements) ,  C++ provides the '&'(referential) operator for calling by reference.

C++ Tutorials