The Latest

DevX - Software Development Resource

What are Aggregates?

The term “aggregate” is used in the ANSI standard to denote an array or a class with no constructors, no private or protected data members, no base classes, and no

DevX - Software Development Resource

The Memory Alignment of a Union

In C and C++, a union is aligned according to the alignment requirements of its largest member. For example: union U{ char c; short s; int i;}; The union U

DevX - Software Development Resource

Understanding What Memory Alignment Means

Most CPUs require that objects and variables reside at particular offsets in the system’s memory. For example, 32-bit processors require a 4-byte integer to reside at a memory address that

DevX - Software Development Resource

When Can a void-Cast be Useful?

Stringent compilers issue a warning message when a function’s return value is ignored. For example: int func(){ return 0;}int main(){ func(); //return value ignored} Indeed, ignoring a function’s return value

DevX - Software Development Resource

Alternative Representations of C++ Operators

C++ defines textual representations for logical operators. Platforms and hardware equipment that do not support all the special characters used as logical operators can use these alternative representations. The alternative

DevX - Software Development Resource

React to Font-Changed Events

Use WithEvents to perform an action when you change any font properties of a specific control or form. Make sure you set the OLE Automation reference in the References dialog:

DevX - Software Development Resource

Q&D Sort Using Hidden List Box

VB has no built-in Sort function. Although lots of sort routines of varying complexity and performance are available, there’s a simple “cheat” that you might find useful. The standard VB

DevX - Software Development Resource

Toggle Listview Headers Between Flat and 3-D

Whenever you want a ListView control with flat, nonclickable headers, use this code to toggle the header style. Flat headers don’t give users the impression of sortability that 3-D headers

DevX - Software Development Resource

A Generic Routine to Fill Unbound Lists

A common need in database processing is retrieving a list of the values of a particular column field for every record in a table. This function takes arguments for a

DevX - Software Development Resource

Consolidate Global Data

We all know that using global variables in our projects is not considered good programming practice. Nevertheless, everyone does it. Sometimes you need to introduce public variables for storing initialization

DevX - Software Development Resource

Speed Up Download Time

Question: How can I speed up the download time of the text and images on my company’s Web site? Is there any rule of thumb to go by? Answer: The

DevX - Software Development Resource

Functions Returning Arrays

Question: Is it possible for a function to return an array instead of a single value? Answer: No but, then again, you don’t really pass arrays as parameters, either. What

DevX - Software Development Resource

Creating a Callback Function Pointer

Question: I am using Microsoft Visual C++ 6.0 and am trying to create a callback function pointer to the public member of a class, but I keep getting the following

DevX - Software Development Resource

Linked Lists and Recursion

Question: I am using several large data structures as linked lists to process some data. Many of my helper functions use recursion. Because of the size/amount of data that I’m

DevX - Software Development Resource

C Equivalent in C++

Question: What is the C++ equivalent of the fflush(stdin) statement in C? Answer: Fortunately, although C++ offers many new ways of doing thing, it still includes everything that was in

DevX - Software Development Resource

Handling Extremely Large Integers

Question: I’m trying to write an app that handles some complex mathematical functions, but am hitting a wall in regards to the int data type. I need to store and

DevX - Software Development Resource

Determine Date Format on the Server

Question: Is there any way I can use ASP to get the date format on the server? I don’t want to return a date and then print it. I want

DevX - Software Development Resource

Using MS Office Objects From ASP Pages

Question: Is it possible to create a server-side object so that an ASP page can gain access to Microsoft Office information? I am trying to find a way to edit

DevX - Software Development Resource

ASP Scrolling Through a Resultset

Question: How can I display groups of records (for example, the first 10 records), then allow the user to click Next to display the next set of records? I have

DevX - Software Development Resource

Verify Whether a File Exists From ASP

Question: I am trying to access some PDF files in a database. I give the address of the file in the browser as an IP address. I am trying to

DevX - Software Development Resource

DHTML Options Object Generation

Question: I tried loading two frames in the browser called “TOP” and “BOTTOM”. The “BOTTOM” frame loads a JavaScript file (j1.js) and another two frames in it called “LEFT” and

DevX - Software Development Resource

Displaying Items Above ActiveX Controls

Question: I am using tags as dropdown menus at the top of my pages. But if I have an ActiveX control below my menu then the dropdown menus’ fall drops

DevX - Software Development Resource

Retain Values in a Page in ASP

Question: Is there any way to retain values in a page (text box, check box, radio, and so on) after going to some other page and coming back? I don’t

DevX - Software Development Resource

Using Form Elements in DHTML

Question: I am having a problem accessing the form elements that are inside a DIV tag. It works in Internet Explorer but not in Netscape. The alert comes in both