Tip Bank

DevX - Software Development Resource

Avoid Multiple Exit Points in a Function

If you have a database function that has multiple return statements, try to minimize the exit points. I will explain with the following example: create or replace function getStatus(p_status_code in

DevX - Software Development Resource

SQL Script from Linux OS

Question: How can I run an Informix SQL Script from the Linux Operating System command line directly? Answer: Use this format: dbaccess The is the name of the database and

DevX - Software Development Resource

How to Emit a Beep?

Question: How do I make a beep in C++? I’d like to make my program alert the user in case of errors. Answer: Use the ‘a’ escape sequence to emit

DevX - Software Development Resource

Private Member as Return Type?

Question: I was trying to test a base class and I came across an unusual question: in the below code, why doesn’t the compiler complain about the return code type

DevX - Software Development Resource

SQL Server Datatypes

Question: Why doesn’t the datatype called sysname show up in all the tables’ dropdown lists of datatypes? Answer: The sysname datatype is a system datatype used to store database object

DevX - Software Development Resource

How Many Member Functions Can a Class Contain?

The C++ standard doesn’t specify the maximal number of member functions that a class can have. However, it recommends that it be 4096. Normally, classes don’t have more than 15-25

DevX - Software Development Resource

Avoiding Code Bloat Caused by Inline

I received an interesting question from a reader. He used STL’s vector in a class that was heavily used in his project. The two compilers he used produced an extremely

DevX - Software Development Resource

Chasing

I often receive readers’ queries regarding non-standard header files that they don’t have in their development suite, e.g.,,, that they wish to install. This header chase is futile

DevX - Software Development Resource

Does the Order of Type Qualifiers Matter?

Do the following declarations differ in any way from one another? const long int N=0;long const int N=0; No, they don’t. C and C++ do not enforce a specific order