
Don’t Forget the Null
A valid C string consists of an array of zero or more characters plus an additional null character. Thus, the shortest possible string must contain at least one character. Remember

A valid C string consists of an array of zero or more characters plus an additional null character. Thus, the shortest possible string must contain at least one character. Remember

In pre-standard C++, the prototype of main() didn’t have a return value. On some compilers, it was: main() /* no explicit return value; int assumed*/ While others used one of

Applications constantly undergo modifications, bug fixes, and customization. Programmers often remove pieces of obsolete code that use a variable while leaving the declaration of that variable intact. A clever compiler

In legacy code and environments that support C exclusively, using scanf() is still a widespread method of getting input from a user (or a file, when using fscanf()). When using

One of the frequently asked questions I receive is: “I’m learning C at school/college/from a book. Am I wasting my time learning this language? Should I be learning C++ instead?”

Question: What is the easy way for a user to access another user’s calendar (or any other folder in the mailbox)? With Outlook 97/98 you can use the not-so-user-friendly File

Question: When initializing a formset, each of the forms in the set are displayed before the order 1 form gets focus. Is there a way to suppress displaying these other

Question: What is an index and what is a sort? Answer: Here is a table that I will refer to during my answer: RecNo cName nAge—– —– —-1 Rick 342

Question: I write language instruction programs and have been calling mplayer2 to allow students to hear the pronunciation saved in recorded sound files. But mplayer takes forever to load and

Question: Can you tell me what this error is? Dr. Watson: An application error has occurred, error log is being generated DBASVR.exe Exception access violation (0xc0000005) address 0x778014e6Event Log:Dr Watson

Question: Our company is using Exchange 5.5 as its e-mail server and Outlook as the base e-mail client. What considerations do we, as a company, need to be aware of

Question: Do I need to buy a separate developer’s kit for Visual FoxPro 6.0, as I did for FoxPro 2.5, which I currently use? Answer: No, the equivalent of the

When you’re using the Palette Properties dialog box to add new JavaBeans components, there’s common to make a mistake when installing them from a package. On the Add From Package

A Java application accesses an ActiveX control via a set of .CLASS files. Preparing a control for use with VJ++ is a two-step process. First, you register the control using

When you construct a Color object in Java, you can supply the arguments in three ways. The most familiar way is to provide three int values each in the range

One of the most common mistakes that most less-experienced Java programmers make is the unnecessary copying of immutable objects. The problem is compounded by the fact that it is not

The Visual J++ Form Designer allows you to both anchor and dock controls on a form. When a control is anchored to an edge of its container, the distance between

Sometimes it is useful to be able to capture the output from a stack dump, redirect it to a string, and then, perhaps, to a window. Here is an example

Sometimes you write an applet that depends on a Microsoft Internet Explorer-specific extension which is not common to all browsers. How do you find out if the browser that’s running

Instead of creating a GridControl to retrieve row and column data from a table into a hash table, use a variant, as shown: variant = new Variant();for (row2get=0; row2get <

Developers should realize that only a few optimizations are supported by most Java compilers. That most Java compilers do little when it comes to optimizing code may be surprising, but

Println statements are very useful for debugging applications, but do you view the output when an applet is running in the debugger? By default, when you create a Visual J++

Question: A user tried to move an e-mail from the Inbox to another folder, and then clicked on his mailbox. The message disappeared from the Inbox, but he couldn’t find

Question: The department I am in would like to have a kind of “posting” center for questions or a kind of “discussion thread” area only accessible to our department. We

Question: I have a problem creating the same mailbox names with different domain names at one server (one site). How can I go about doing that? Or can I only

Question: When connecting to an Informix database using Visual InterDev and SCO Retriever 32 ODBC, I can see tables and column names but when I try to look at data,

Question: How do I build crosstabs in Visual FoxPro? Answer: Visual FoxPro has a wizard that helps you create a Crosstab query. From the Wizards submenu on the Tools menu,

Question: I would like some Visual FoxPro application as a starting guide in VFP 6. I’m finding it hard to add commands using a form. For example, I want to

Question: I need to delete certain characters from a string, particularly a money field in the format 99,999,999.99. Is there an easy way to delete the commas and period from

Question: As I understand it, the DECODE function or procedure is available in XPS 8.3 and IDS 2000 9.2 or above. Is it available in 7.2x? If not, is there