The Latest

DevX - Software Development Resource

Example of Code Structure for COM+ Component

In this article I show you my ordinary code structure for COM+ components. I show this in preparation for further articles about debugging tips. When I show this example, I

DevX - Software Development Resource

The fill() Algorithm

The algorithm fill() is declared in as follows: void fill(ForwardIterator f, ForwardIterator l, const T&); The arguments f and l mark the sequence’s beginning and end, respectively. fill() fills the

DevX - Software Development Resource

How to Delete Dynamically Allocated Multidimensional Arrays

You can allocate a multidimensional array using new as follows: class A{public: int j;//…constructor, destructor, etc.}void func(){ int m; A (*pa)[2][2]=new A[2][2][2]; // three dimensional array m=pa[0][0][0].j; // access member

DevX - Software Development Resource

Clarifying a Common Source of Pointer Confusion

Novices, especially those who have experience with garbage-collected languages, are often confused with the concept of object deallocation and destruction in C++. They tend to explicitly invoke every object’s destructor

DevX - Software Development Resource

Duplicate Namespace Aliases

A definition of namespace alias can be used to redefine a previously defined namespace alias declared in that scope, as long as the new definition refers only to the same

DevX - Software Development Resource

Rotate Ads on WAP

Question: How do you integrate an ad-serving technology (such as one by Doubleclick that enables you to rotate ads on a regular Web page) onto a cell phone or PDA?

DevX - Software Development Resource

IIF Function Under SQL Server 7.0

Question: Is the IIF function valid under SQL server 7.0? It’s in the SQL Books Online as valid, but none of my stored procedures accept it. Answer: The IIF function

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

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

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

Keyword ‘huge’

Question: I am getting a compile error ‘huge’ obsolete keyword. I am converting a process from Visual C++ 2.0 to 6.0. What keyword could I use in place of ‘huge’?

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

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

The MB InterProcess Control

This control lets you have two applications that communicate with each other. Just select the target application by its handle or partial/whole caption, set the string or the Long data

DevX - Software Development Resource

An error that must be trapped

When you use JIT activation in particular there is a special situation that you have to be prepared for. While discussing that issue, I will also show a trap when

DevX - Software Development Resource

Determine the RecordCount of a forward-only Recordset

When working with a forward-only, read-only Recordset – that is, the default ADO Recordset – the RecordCount property always returns -1. (This can also happen with other types of server-side

DevX - Software Development Resource

Open a password-protected MDB database with ADO

The syntax for opening a password-protected Jet database might not be obvious. In fact, assigning the password to the Password property in the ConnectionString raises the following error: Run-time Error:

DevX - Software Development Resource

Read and write File ODBC data sources

A file DSN is nothing but a text file that contains all the parameters for an ODBC connection. To prove this, just go to the default directory that holds all

DevX - Software Development Resource

All the Changes, All the Time: Part II

o briefly recap the situation I described in “All the Changes, All the Time: Part I“, my assignment was to capture all the changes being made in one database and,

DevX - Software Development Resource

Checking to See If .class Files Are Corrupt

Here is a little tip to check if any of your .class files are corrupted or if they are not .class files generated from a .java file. There Related Posts

DevX - Software Development Resource

Connecting SQL Server 7.0 and MS-Access

You can connect a MS-Access database to SQL Server as a linked server, and query Access tables in SQL Server’s Query Analyzer. This can help in porting data from Access