devxlogo

September 9, 2000

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

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

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

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

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