
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.
The standard assert() macro tests its argument. If the result evaluates to 0, the standard abort() routine is called. Back in C heyday, it was a very useful debugging tool
If you are using templates in your code, you are probably aware of their invaluable advantages. However, templates can cause a code bloat: The compiler reduplicates the template’s body for
In large projects, where hundreds of source files have to be compiled on every build, the long compilation time can be reduced significantly if templates are explicitly instantiated all at
A template name is not a type. When you need a template functioning as a full type (for example: to serve as a base class or as a function argument),
Templates are generic due to their type unawareness. However, there are cases where you need a special behavior for a specific type. C++ supports these cases by means of template
It’s possible to dynamically create a Web page from an FTP directory listing of files with a particular extension. While there are sophisticated components (.DLLs) that you could add, you
The latest version of JavaScript used by both Netscape Navigator 4.x and Microsoft Internet Explorer 4.x includes a C-like switch statement that closely mirrors the SELECT CASE statement available in
It’s possible to dynamically create horizontal and vertical lines and rectangles using Internet Explorer 4.0 Dynamic HTML to alter the width and/or height of a single pixel image. Using this
Animating between a number of images is fairly easy to do and works in Netscape Navigator 3.0+ and Internet Explorer 4.0+. Put the URLs of the images you’d like to
Question: Is there a way to print an HTML page (perhaps using VBScript or JavaScript) without the user clicking on the print button? Answer: Ah, printing! You would think that,
Question: I am having problems setting a lower z-index for a layer that contains a combo box. All of the elements in that layer are covered by a higher z-index
To run executables and objects from Word and Excel from Active Server Pages, you need to change the value of an IIS4 Metabase property called AspAllowOutOfProcComponents to True. The easiest
There are a number of important limitations on the use of cookies by Web site developers. This is because cookies are intended to be used only for infrequent storage of
For Visual InterDev to work properly, you need to duplicate the data source names (DSNs). The trouble is that, in Visual InterDev 1.0 (VID), the workstation and the Web server
Question: Is there a way to place and/or move a layer over different frames? I have a menu-frame on the left and a main-frame on the right. Now I’m trying
Question: Is it possible to display a grouped column as a percentage of the whole? Say I have a table that has two fields: ACCESS_TYP CHRG————————- 10 1.00 10 2.00
Question: What is the best path to follow if I wanted to learn to program? (VB, then assembly, then …)I need to know what to start with so I can
Question: I’ve been working on the + operator in my string class. I came across an interesting dilemma: the following code doesn’t call any of my + operators.For example: String
Question: A book I have purchased on C++ programming describes how to make menus. It says to use the Resource Workshop that came with my Borland 4.0 compiler. However, whenever
Question: I work in Borland C++. My program compiles very well, but it exits it with the “stack overflow” error even before executing the first command. Answer: It won’t be
Question: Who invented C++, and why is it so popular? Answer: C++ was created as an extension to C by AT&T researcher Bjarne Stroustrup, who built the first version of
Question: I do a lot of programming in Visual Basic 5. I develop my own components and DLLs. Most of the components I develop are for use with PC data
Question: I’m attempting to write a command line program which has switch functionality (such as the DOS switches). I’m not sure how to code the program to accept the switches
Question: How do you use the Exec() function to run another executable program out of your C++ application? The help files have syntax on this, but I need someone to
Question: Is there any way to see/select/query referential constraints on tables? I have some constraints on a table that I did not create, and I want to see what rules
Question: Using VCafe 2.8 in a Win95 enviornment, I’m trying to spawn a local executable during the runtime of a Java application. I’ve tried using: Process p = Runtime.getRuntime().exec(strCmd); but
Question: Could you tell me what the proper syntax is for the sscanf function, and what return/error codes exist. This was for a Sparc-compiled program. Answer: Though newer programmers seem
The results of deleting an object more than once are undefined. However, if code modifications are impossible (when a third party code is used, for example), a temporary workaround to
You can use both — and ++ as prefix and postfix operators. When applied to primitives such as int or char, they are indistinguishable in terms of efficiency. When applied
An enumerated type is simply a list of constants, each of which has a unique value. An Enum can improve the readability of your code by allowing you to declare
