C/C++ Tutorial
Creating Tetris Using Visual C++ Windows Form. Part two.
This is a tutorial that describes the process of creating Tetris game as a Visual c++ Windows Forms Application.
Creating Tetris Using Visual C++ Windows Form. Part one.
In this article you will find the description of the implementation of the Tetris logic
Simple Binary Tree in C++ - Part 1
Today we are about to see how simple and fast it is to build a binary tree in C++. Binary trees are generally useful when you need a quick search in a given data set.
Quick Prime Number Test - Method: Advanced
While the last Quick Prime Number Test was done at a basic level, today we are going to advance and used much more from what can be done in C++.
The declarations will now be the following:
- #include <iostream>
Quick Prime Number Test - Method: Basic
With prime numbers, we always get a headache. We will see 2 tutorials about quick prime number testing, this one at a basic level, the next one at an advanced level.
The idea of our test is the following: We create an array of bool values, to represent numbers like this:
0 - FALSE
1 - FALSE
2 - TRUE
3 - TRUE
4 - FALSE
5 - TRUE
6 - FALSE
7 - TRUE
8 - FALSE
9 - FALSE
10 - FALSE
11 - TRUE
And so forth! Where we have TRUE, it is a prime number, where we have FALSE, it is not a prime number.
Factorize Number with Vector and Pair
We'll see how you can factorize a natural number, using vector and pair from the C++ STL!
First, you need the following declarations:
- #include <iostream>
Very Simple and Efficient Student Database
The next project will demonstrate advantages of C++, such as:
- using typedef
- using the #define directive
- using simple, short source code to handle apparently large tasks
- easy to read code, if you develop your simple programming style
The task we are going to accomplish is a simple and efficient student database. Although we have put some amounts (limitations), these can be changed very easily! Furthermore, for the simplicity of the tutorial we only used cin to read data.
C++ Class for Complex Numbers with Demo Application
Today, we will see a real and simple C++ class for complex numbers.
Simple Phone Book in C++
Today, we will create a simple C++ console application to handle a simple phone book. This phone book will only store people’s name and phone numbers.