Articles - 2010 archive (Page 2)

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

 
Printer Stream
 
A little while ago, someone made a post like this ostream printer; printer << "Some text" << endl; and wondered why it didn't print. So I thought I'd w...
[8 replies] Last: Ah yes, good call on that one. (by moorecm)
Passing arrays to and from functions safely and securely
 
I wrote this article for the purpose of addressing common problems that are experienced by the programmers posting questions to the forums. I'll provide numerou...
[13 replies] Last: I wanted to follow up with an example that demonstrates why the std::... (by kempofighter)
My way to make a game map in the console.
 
simple enough... This post most likely contains either an error or something somebody disagrees with. This is just my way to do this,If you have other (or be...
[5 replies] Last: I would create this helper: struct Coord { typedef short va... (by jsmith)
Top 10 tips for code porting c/c++
 
Code portability basically refers to making source code able to compile on different platform without making any changes in source code. While coding its very...
[13 replies] Last: Surely there's more to porting than that. No mention of how to deal w... (by kbw)
Inline function Advantages, Disadvantages, Performance and User Guidelines ? (1,2)
 
Inline function is the optimization technique used by the compilers. One can simply prepend inline keyword to function prototype to make a function inline. Inli...
[29 replies] Last: But still if we talk about portable code we cant always rely on compi... (by imi)
So you want to program games? (1,2)
 
NOTE: This article does not start you on game programming! The Beginning: A lot of people who want to be video game developers seem to misunderstand what ...
[33 replies] Last: Apparently there are lots of jokes on noobs wanting to code a game ht... (by Bazzy)
Linked Lists
 
Article based on Linked Lists by computerquip revision 2: Linked lists are a basic concept in almost all programming languages, including interpreted and hig...
[6 replies] Last: Error: in C, a Node* isn't valid. That should be struct Node* .... (by chrisname)
User made database for learning c++?
 
This is not going to be an article to start but I was not sure were else to put it. I was thinking maybe it would be a helpful resource to others if there wa...
[4 replies] Last: I was just mentioning it because to me, it seems clear that Player::He... (by chrisname)
by jsmith
When to pass parameters by value, reference, and pointer
 
Occasionally we get posts asking the differences between references and pointers, and in the context of function calls, when to pass parameters by reference, ...
[9 replies] Last: The difference between passing by const reference and by value is one ... (by jsmith)
by jsmith
The clone pattern
 
In order to copy an object, you have to know at compile time the object's type, because the type is the "name" of the copy constructor: void copy_me( con...
[1 reply] : In order to copy an object, you have to know at compile time the obj... (by hamsterman)
Member Initialization List over Assignment
 
To start with, this article is not actually my own words. It is a small section of the fantastic book "Efective C++: 55 Specific Ways tom Improve Your Programs...
[7 replies] Last: There is a difference in C++ between initialization and assignment ... (by jsmith)
An alternate to using getch()
 
OK, I have seen enough people suggesting the use of non-standard getch() or _getch(). Please, refrain from using the conio.h library as it is unreliable and ...
[9 replies] Last: Like I said, it's only unreadable to me because WinAPI is unreadable t... (by chrisname)
Guide to Common Standards (1,2,3)
 
Currently under-construction. INTRODUCTION What is a set of standards and why am I reading this? The purpose of C++ standards is to define a C++ cod...
[45 replies] Last: I am yet to work in such in environment so I failed to see it being s... (by kempofighter)
random tips and tricks that might be useful
 
1. have you seen unindented codes from the forum? well if you're using code::blocks, there is a plugin called AStyle aka Source Code Formatter.. just goto plu...
[9 replies] Last: well if you're using code::blocks, there is a plugin called AStyle ak... (by chrisname)
Enabling GodMode on Windows 7
 
"GodMode" if you can call it that, is an advanced Control panel available to the new Windows 7. Only it is also available on Windows Vista as well and was well ...
[7 replies] Last: [quote=DrChill]how do all these easter eggs get found? People who ... (by gcampton)
by jsmith
C++ type erasure
 
One of the significant advantages templates have over polymorphism is their ability to retain type. When you write a function frobnicate() that takes a base ...
[15 replies] Last: Another reason to use type erasure, as a colleague put it: when the t... (by jsmith)
by jsmith
Copy constructors, assignment operators, and exception safe assignment
 
What is a copy constructor? A copy constructor is a special constructor for a class/struct that is used to make a copy of an existing instance. The c...
[3 replies] Last: Sure. It just means that if you, the programmer create some type Fo... (by jsmith)
c++ and java differences (1,2)
 
i've just learn the basics of c++ and figured out some differences of c++ and java. i'd like to post this for others to have a clue when learning a new language...
[22 replies] Last: So do I. Not doing so is asking for memory leaks and such. (by chrisname)
Year 2010 Pages: 12
  Archived years: [2009 archive] [2011 archive]

Cannot post in this page. To post a new message, go to the first page.