Articles - 2008 archive

NOTICE: This forum is now permanently closed.
No new threads can be created.

To post a new article, please visit the Articles section at http://www.cplusplus.com/articles/.

 
strtok uses
 
First off, I visit this site quite regularly, but I've never posted. I find lots of help here and thought I'd return the favor. I recently worked on a project t...
[5 replies] Last: It's much clearer to use regular expressions to stuff like this. Esp. ... (by zeeme)
Conditionals - The true or false story
 
I have yet again seen a piece of code similar to the following very common mistake if (chr == 'Y' || 'y') // this will always return true do_something; /...
[10 replies] Last: Er, actually there are a couple more. ∧ conjunction ... (by Duthomhas)
Recusion Types
 
Introduction Here I am going to give a detail about Recursion in C++. Definition: Recursion is the process where a function is called itself but stack frame ...
[1 reply] : Dear Assadulla In non-reursive processes , the unknown is defined by... (by Massoud Raji)
double - and how to use it
 
This article shows some properties of "double" atithmetic, and what you can and can't do with it. NB: it requires UTF-8 support for mathematic symbols. 0. M...
[2 replies] Last: Check your first corollary in part two Oops. Fixed. Another thi... (by exception)
Rounding Algorithms
 
There are a zillion different ways to round floating point values to integers. C and C++ provide a couple basic ones in <math.h> or <cmath>. There are two ge...
[4 replies] Last: The round half down did exactly what it should have. Given a number ex... (by Duthomhas)
[DRAFT] How To: Recursion
 
As Recursion seems to pop-up every now and then I have started to write an Article on it (I will hopefully have it ready in a few days, time permitting). If any...
[14 replies] Last: It's harder to debug a recursive function. (by Zaita)
The unofficial Beginner's tutorial
 
The Basics Welcome to the C++ tutorial! Please follow all instructions on a source file. Ready? Good! Now, to begin...
[2 replies] Last: Sorry, wrote it all in an IDE, instead of on the web first. I will edi... (by QWERTYman)
[ANOTHER DRAFT]How To: Private Access in Classes
 
This article assumes that you know what a class is, and how to declare one, as well as how to create an object of said class. However, something that usually...
[4 replies] Last: Encapsulation is also handy because the underlying member variable may... (by dooglio)
Customize Your Applications with Innovative Skin
 
skinfeature is a mature, stable, and comprehensive GUI design software solution that allows you to create custom skins for your new or legacy Windows based ap...
[1 reply] : It'd be nice if there was some documentation, sample source code on th... (by Zaita)
C++ Templates and Libraries for Working with Threads
 
Not sure how well known this open source project is but I've been using it for a couple of months now and it is quite impressive: http://www.threadingbuildingb...
[2 replies] Last: I haven't tried integrating it into exisiting code, it was a new proje... (by bnbertha)
How to: Put code into your postings
 
When posting code in your question or answer; displaying the code in a nicely formatted manner helps all those involved in the tread to quickly understand the c...
[1 reply] : thanks (by ablya)
You want to build a program but where to start?
 
You want to build a program but where to start? OK, I'll tell you. This should be done in the following steps: 1. Specifications 2. Design 3. Implementation...
[7 replies] Last: The class definition is probably not the best example for beginners. ... (by Faldrax)
by amro
Inheritance Rules
 
class person { int ID; protected: int salary; public : string name; }; class employee : access_specifior person { int num; public : string emplo...
[no replies]
by Graham
The Pointer
 
NOTE: This is just because a lot of beginners need a grasp on this concept. WHAT IT IS ---------- Pointers are addresses. The can be assigned, or made to...
[8 replies] Last: Ropez, The first quote is from a disuction of the need for nullptr in... (by closed account z05DSL3A)
by Graham
Dynamic allocation in C/C++
 
WHAT IT IS ---------- Dynamic allocation is the automatic allocation of memory in C/C++, Unlike declarations, which load data onto the programs data segment...
[2 replies] Last: Graham: >>dynamic allocation creates new usable space on the progra... (by satm2008)
Array is not pointer
 
With many thanks for these useful tutorials, I felt it's necessary to send this text about pointers and arrays. Unfortunately pulling out something wrong that i...
[1 reply] : You have a point, but you have one flaw: ARRAYS ARE CONSTANT POINTE... (by Graham)
by Sacha
Making Games in C++
 
In order to make a successful and user- friendly game in C++, we need to remember the following things: First of all, simplicity is the key. Of course, if you ...
[4 replies] Last: it is nice thanx but it is nearly a C code. Classes are important in p... (by leo)
by PWWWWR
Game Programming with DarkGDK
 
The Game Creators (http://www.thegamecreators.com) have developed a C++ framework that uses Direct X and Visual C++ 2008 Express to make games. The easy to use...
[no replies]
Tired of shifting bits?
 
I've looked at one too many pieces of source code that uses bit shifting along with bitwise ANDs to extract a value from a larger data size (for example, an IP...
[1 reply] : Unions are lots of fun. Though for individual bits, wouldn't a 32-long... (by AzraelUK)
The difference between pointers and arrays
 
The difference between pointers and arrays I have seen in many places that an array is introduced as a pointer. This is technically not correct. Arrays are n...
[no replies]
Year 2008 Pages: 12
  Archived years: [2009 archive]