February 14, 2000

C-Style Function Pointers

Question: While trying to port some C code to a C++ implementation, I ran into this problem. The module this came out of was designed to “automate data handling used

Explaining the Modulus Operator

Question: What does the modulus (%) operator do? Answer: The modulus operator returns the remainder of a division operation. For example, 5%2 equals 1 because dividing 5 by 2 gives

Deleting/Expanding a Column

Question: What is the proper method(s) to delete a column from a table or expand the size of a column in a table? Adding is easy. Deleting and changing obviously

Pointers to Class Member Functions

Question: I’m trying to write a program that has a pointer to a private member function of a class. A public member function calls some of the private functions by

Segmentation Fault

Question: What is a segmentation fault? I get it when I try to output an integer. (It’s a very basic program: it reads in an integer and spits it back

Informix OLE DB Provider

Question: I have IDS 7.31.UC2A and I want to register Informix OLE DB Provider on this database server. I need the %INFORMIXDIR%etccoledbp.sql script for running it against the sysmaster. Can

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 *_*

Order Objects Constructed on a Window

Question: I have a number of datawindows in a window. In a post-construct event I am making a call to another datawindow. Every so often when I open the window