Tip Bank

DevX

Const Member Functions

Question: What does the ‘const’ in the following funciton prototype mean? class A{public: void fn (int a ) const;} Answer: The const after a member function’s parameter list indicates that

DevX

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

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

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

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

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?