devxlogo

Tip Bank

DevX - Software Development Resource

Trivial Constructors

Conceptually, compilers synthesize a default constructor for every class or struct, unless a constructor was already defined by the user. However, in certain conditions (a simple data struct, for example),

DevX - Software Development Resource

Mailto Subject Changes

It’s possible to create mailto links that include a subject line in addition to just the recipient’s e-mail address, however, not all e-mail programs support this functionality. That said, to

DevX - Software Development Resource

Garbage Collector in C++?

A garbage collector is handy, since it eliminates a big source for bugs, runtime crashes and memory leaks. However, garbage collection is not for free; it incurs additional runtime overhead

DevX - Software Development Resource

Three Flavors of Polymorphism

Polymorphism is the ability of different objects to react in an individual manner to the same message. This notion was imported from natural languages. For example, the verb “to close”

DevX - Software Development Resource

Rename a Login

Question: Is it possible to rename a login? Answer: Sorry, no. You must drop the login and then create a new one with the corrected name.

DevX - Software Development Resource

Log truncation

Question: My database and log keep filling up and I can’t truncate the log. Any suggestions? Answer: There are two methods to empty the transaction log. One can regularly dump

DevX - Software Development Resource

The Rationale Behind Namespaces

Some users consider the addition of namespaces to C++ as superfluous or even harmful. In order to understand why namespaces were added to the language, imagine that the file system

DevX - Software Development Resource

Provide Print Preview

You can provide Print Preview at different scales. First, make your printing routine take on the object it should draw as a parameter. Then, for printing, pass the routine the