Tip Bank

DevX - Software Development Resource

Container of Pointers

Many programmers believe that by storing pointers instead of objects in a container, they improve performance. However, they forget that the pointers still refer to existing objects that must be

DevX - Software Development Resource

Understanding Stack Overflow

The stack is a region of memory on which local automatic variables are created and function arguments are passed. The implementation allocates a default stack size per process. On modern

DevX - Software Development Resource

Disabling Further Inheritance of a Class

To block a class from being derived any further, declare its constructor private. Next, add a public static member function Instance() that creates an instance of this class and returns

DevX - Software Development Resource

Nested Classes and Friendship

When you declare a nested class as a friend of its containing class, place the friend declaration after the declaration of the nested class, not before: class A // containing

DevX - Software Development Resource

Function’s Return Value

Question: I’d like to know how can I make a return of a function’s local variable (for example, a reference to it) not using pointers technique? Answer: You have tow

DevX - Software Development Resource

Uses of Reserved Word Operator

Question: In MFC, what does the following declaration do? CPen::operator HPEN() const; My understanding of the operator keyword is that you cannot use it to create a new operator; however,

DevX - Software Development Resource

Calling a Procedure with a Variable

Question: How can I dynamically build a procedure call string and then get it to execute? Ex. Dim action as String action = “proc(param1,param2)” call action I know this does

DevX - Software Development Resource

SQL Selection from Visual Basic 6.0

Question: I’m trying to install a search facility on a database program I have written using VB6 and an Access database. I’ve opened by inserting a data control onto my