devxlogo

Tip Bank

Protected Constructors

Question: Can a constructor in Java be declared as protected? Answer: Yes, Java constructors can be declared as protected. You will usually declare protected constructors when you do not intend

Problem with Pointer-to-Member in Templates

Question: I am trying to write a template that somewhat resembles how an inner class works in Java: template class Callback{public: Callback(T& t) : parent(t) { } void Execute() {

Hexadecimal Array

Question: I am trying to create an array of 256 hexidecimal values but am havingsome problems. How do I create a valid array using hexadecimals? Answer: Whether you use hexadecimal

Informix’s Future

Question: What is the future of Informix with Oracle and others seeming to pull so far ahead? Answer: Granted, I am a dyed-in-the-wool Informix bigot, but here’s my take. Disclosure:

Writing to File from Several Functions.

Question: The code below creates a file, Basket.doc, in the current directory. I am using a compiler with a component I would like to place in fWrite() to let me

Mouse movement control

Question: Can you tell me if there’s a way that I can force the mouse to move to a certain position on the screen, e.g. 20 pixels down, 15 pixels

Sizeof Structure as Defined, Not Allocated

Question: Given: pre>typedef struct{ byte a; byte b; byte c; byte d; byte e;} LETTERS; sizeof(LETTERS) returns eight bytes because of padding by the compiler for alignment.How can I determine