Tip Bank

DevX - Software Development Resource

Unconsting a Const Reference or Object

Question: I have encountered a problem as follows: void foo(const int& var){ foo2(var);}void foo2(int& var)… So what I did was void foo(const int& var){ foo2((int&)var); ^^^^^^} and it compiled *_*

DevX - Software Development Resource

Dynamic Views Using the System Date

Question: I have a user who wants me to create a dynamic search view where the data retrieved is effective within the last six months using the system date. Is

DevX - Software Development Resource

Removing cc:Mail Connector

Question: I need to remove the cc:Mail connector. How do I do this? Answer: Though it would seem intuitive to select the connector and click Delete but that actually won’t

DevX - Software Development Resource

Generate a Random Whole Number in JavaScript

You can generate random numbers in JavaScript using the Math.random() method. This function returns a fractional random number between 0 and 1. Unlike other languages, JavaScript will initialize a random

DevX - Software Development Resource

Where Are Exception Objects Stored?

Consider the following program: class Exception {}; int main() { try { throw Exception(); // where is the exception stored? } catch( Exception & ex) // catch by reference {}

DevX - Software Development Resource

Heap or Free-Store?

The terms heap and free-store are used interchangeably when referring to dynamically allocated objects. Are there any differences between the two? Technically, free-store is an abstract term referring to unused

DevX - Software Development Resource

Validating Data Entries

Suppose you have an application that reads input from the keyboard. How can you detect whether alphabetic data is being entered into an integer field from a cin statement? The