Articles - 2009 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/.

 
by Disch
Put your code in code tags
 
If you post code on this forum, put your code in code tags. If you already pasted some code without using code tags, go back and edit your post and put code ...
[8 replies] Last: either code tags, or pastebin.com. pastebin by far is really easy, as ... (by xitan)
Article Preview/Submit Question
 
I recently wrote an article on how to use tags, but I'm not sure how to "submit" it, does submit/preview automatically submit the article for you?
[4 replies] Last: Good point, misleading title FTL >_> (by firedraco)
by Disch
Multidimentional arrays are evil
 
Multidimentional arrays are evil. I see a lot of noobs get sucked into the vortex that is multidimentional (hereon MD) arrays. MD arrays are a "featur...
[8 replies] Last: How does it accomplish that? I tried to do something like that in a c... (by kempofighter)
by Disch
WinAPI: Being Unicode Friendly
 
Section 0) Introduction This article is to go over being Unicode Friendly in WinAPI. I don't normally encourage programming in WinAPI, since you're typ...
[10 replies] Last: wcout doesn't work like you'd expect. It's pretty much useless. I ... (by Disch)
main() never executing. an academic exercise
 
Frequently I have heard the question, "Can you write a program without main()?" The answer is yes... if you either delve into assembler or do some command line ...
[12 replies] Last: Oh. I haven't read anything in init; I've glanced at panic, printk and... (by chrisname)
by Null
Passwords
 
I'm going to show how to get passwords on windows and linux UNIX: One of the simplest ways is to use getpass() function: #include <cstdlib> #incl...
[4 replies] Last: Wouldn't that cause undefined behaviour? I thought you aren't allowed... (by chrisname)
DLL Symbols
 
What is a DLL? A DLL is a dynamic-linking library. It acts as a shared object in which multiple programs can call the same DLL more than once. Why use...
[3 replies] Last: There aren't any big difference between DLL and EXE. Why? Because It'... (by Null)
Pig Latin XD
 
I completed it :) input text filter output piglatin http://en.wikipedia.org/wiki/Pig_latin #include <cstdlib> #include <iostream> #include <conio...
[1 reply] : #include <conio.h> :( Don't bother making main take arguments ... (by firedraco)
How to use the Conditional (ternary) operator: (1,2)
 
Note: It has become apparent that what is known as the ternary operator in C is in fact called the "Conditional Operator" in C++. Thank you, Grey Wolf. So I ...
[32 replies] Last: Voting sounds nice, maybe something like slashdot where low rated con... (by chrisname)
Template Instantiation
 
Template Instantiation I was looking around for something to wite a small article about and this seems to a good one. The forum gets a fair number of post ...
[4 replies] Last: Yes (unless you have a cool export-compliant compiler) (by Bazzy)
C++ LAPACK
 
The following is a framework for using LAPACK with C++. For more information checkout the LAPACK forums: http://icl.cs.utk.edu/lapack-forum/ And the netl...
[7 replies] Last: than you for your answer.this case too hard for me now :D. i must lear... (by areyoupp)
How to parse command line parameters.
 
A simple tutorial on command line parameters, as some people may not know how it is done. -sec "What's the point?" The point is that with command-line param...
[19 replies] Last: oh, ok. (by chrisname)
Clear the screen (1,2)
 
This short article describes the method of clearing the console display of all text and positioning the text cursor in the home location (the upper-left corner)...
[37 replies] Last: :-) (by Duthomhas)
Object Oriented XML
 
I developed a base class that any MFC object, COM object, CORBA object or any custom object may derive from to provide the best XML support available. The fu...
[no replies]
Objectify design pattern
 
As is common in any programming language, the greatest boon usually also turns out to be the greatest bane. In C++, this comes in many forms. One of these is th...
[no replies]
by Bazzy
Converting numbers to strings and strings to numbers
 
This question is asked quite often, so here is a way of doing it using stringstreams : number to string int Number = 123;//number to convert int a s...
[17 replies] Last: try with wstringstream: wstringstream wss; wss << 324545678; wstri... (by Bazzy)
Why system() is evil
 
So, you are here because everyone keeps telling you that things like system("PAUSE") and system("CLS") are bad. But no one really says why . Here's why....
[4 replies] Last: Er. The whitespace is optional. :D (by QWERTYman)
OutPut Array To Txt File
 
I have been scrolling around on forum to forum and i have noticed that many people are lost when comming to outputting an array and dealing with Random Numbers...
[2 replies] Last: yupp your completely right lol (by jloundy)
by Disch
Headers and Includes: Why and How (1,2)
 
************************************************* ** 0) Introduction ** ************************************************* Thi...
[25 replies] Last: Yes, that's exactly right. That used to be a paradigm some folks kept... (by jsmith)
Bit-Banging a counter
 
Here's a bit of code that I thought that I would share. It comes from a PLC (Programmable Logic Controllers) website, and it's an example of how to count to "n...
[2 replies] Last: You're right. I personally would never use something as obscure as thi... (by rootboy)
Year 2009 Pages: 12
  Archived years: [2008 archive] [2010 archive]