
C vs C++
Question: What is the main difference between Visual C and Visual C++ in Windows environments? Why would I want to use C++ instead? Is there any functional difference? Answer: Well,

Question: What is the main difference between Visual C and Visual C++ in Windows environments? Why would I want to use C++ instead? Is there any functional difference? Answer: Well,

Question: When I press the Close button on my app’s main form, the program appears to end. When I look at the Windows task list, however, my app is still

Question: Is it possible to save an object (in my case a collection) directly to a file, or must one extract the object’s properties and save each individually? Answer: Visual

Question: Is there a way to force a specific constructor with an interface? Answer: No, there is no way to force implementors of a given interface to use constructors with

Question: I have a question regarding use of dual monitorUnix workstations to display Java screens.Specifically, can I display the mainscreen on onemonitor and the popup on another monitor? Answer: Within

Question: Is it possible to convert from java.net.InetAddress to string? Answer: Yes. Just call the InetAddress toString() method. Also, if you specifically want the host name, use getHostName. If you

Question: My development background primarily involves COBOL and BASIC on UNIX platforms. I decided to further my language knowledge and branched out into C & C++. I’ve largely been teaching

Question: Given an exception, how do I convert the stack trace into a string? I want to capture the entire contents, the message and the trace, to a string. Answer:

Question: Why should some of the statements that might throw an exception be in try/catch block (otherwise the compiler reports a syntax error), and some need not be, even though

Question: How do you dynamically allocate memory for a two-dimensional array? This is what I had, and my g++ compiler didn’t like it: int **m;m= new int [100][100]; Answer: Yep.

Question: How do I use one application to close another application in Windows 95? I need to overwrite a loaded DLL, so I have to close the application that loads

Question: Is it possible to make recursive subroutine calls in Java? Answer: Yes, you can make recursive method calls in Java.Just make sure you have a termination condition to avoid

Question: Does Java have a command that does what thesystem() function does in C, or a way to emulatethis action? For example, in C, system(“ls”); would call “ls” from the

Question: I have a data structure similar to this: struct SPRITE { int x, y; int jumping;}; This struct is easy to use in a game, because I can just

Question: I know how to fetch content of a URL address in Java, but what do I to write to a CGI script using the HTTP POST method? Answer: Passing

Question: I’m using Borland C++ to perform some data conversion, and I have had some difficulties. Is it possible to convert all the text (including nonreadable text) within a text

Question: I want my Web page to have three frames: one for my applet and the other two for information. How can I make it so my applet updates both

Question: I am trying to program my own custom controls in C++ in the old, traditional style (using WNDPROCS, etc.), and I don’t want to use ActiveX. I’d like to

Question: I am urgently looking for information regarding Year 2000 compliancy for Borland’s C++ compilers, esp. versions 3.1 and 4.02. Answer: I can’t imagine anything about C++ or the compiler

The java.awt.TextComponent class (from which TextArea is derived) has three methods to retrieve mouse selection information. The getSelectedText() method will return a String containing the selected text, and the getSelectionStart()

Many programmers like to use Java to automate access to network resources because it is so easy to write networking code with the Java networking classes. Accessing URLs through Java

The Java core API provides classes in the java.net package to handle basic networking functions. The URL class represents a pointer to a network resource, like the actual address. The

Everyone loves a good sound bite. You can use the PlaySound() function in the Windows Multimedia DLL (WINMM.DLL) to play a wave (WAV) file that is stored as a resource.

You can easily duplicate the tooltips that appear when you float the mouse over a button in Microsoft’s products. This code displays the tooltip in the lower right-hand corner of

This code produces a “random” sequence of integers between specified Lower and Upper values without duplication. On the first call to the Shuffle routine with new values for Upper and

When writing a game for Windows 95, set the display resolution to 640-by-480, set the color palette to True Color when it runs, and restore it to its initial mode

VB provides only single-line comment functions: “REM” and “‘”. If you’re looking for another way to comment out a block of code, use conditional compilation in VB4 instead. Define “COMMENT

When doing animation, such as scrolling a label or using picture boxes, I first used the method described by Eric Bernatchez (“Smoother Control Animation,” “101 Tech Tips for VB Developers,”

You can use subscripts and superscripts in a RichTextBox control. To prevent the control from truncating text that is raised or lowered too far, reduce the characters’ size accordingly: Private

Use this code to get data out to different formats without requiring a complete copy of the DBMS on the user machine. Create a new project with a command button,