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 string class offers three versions of the overloaded == operator: bool operator == (const string& left, const string right); bool operator == (const char* left, const string right);
In many systems, legacy C code is combined with newer C++ code. A common (yet wrong) practice is to wrap the C functions in a single C++ class and create
The construction of an object consists of several phases, including constructing its base and embedded objects, assigning a this pointer, creating the virtual table, and invoking the constructor’s body. The
This code works wonders to reduce flicker and lessen your frustration. Place a timer on the form (tmr_Timer) and set the Interval to 1000. Set Enabled to False, then place
When you place controls on a form, the Font properties of all the controls default to a sans serif font rather than a default font that you specify. To avoid
Question: I am trying to open multiple sockets at differing IP addresses. Is there a way to make it so that the open socket call will wait for only two
Question: How can I position the System.out.print cursor when printing to the DOS window? Specifically, how can I print to specific positions on the DOS window without printing one continuous
Question: Is there an easy way of determining the RGB values when you have the long value of a color (for example, a “reverse” RGB(x,y,z) function)? Answer: You can make
Question: I can’t sort by the second-last digit of a number (for example, sorting the numbers 4491, 1195, and 1364 by the third digit). Answer: Try using the “RIGHT” function
Question: I have searched high and low and cannot seem to find a code example of how to add sound (attach a WAV file) to the opening of my application.
Question: Are there specific recommendations for the maximum size of any database? For instance, does performance suffer if the database size is too large? Answer: Certainly, the amount of data
Question: Is there an easy way for Powerbuilder developers to version their apps for releases (Major.Minor.Revision)? Is this built into PB? Answer: No, you have to do this manually with
Question: How can I access the controls placed on a tabpage in a tab object (for example, from a user event on a sheet window containing the tab object, to
Question: Does Java support an equivalent to the Pascal variant record or C union? I need to port some code to Java that uses these constructs. Answer: No, Java does
Question: The following code works: public class MyClass { private int value; public MyClass() { this(1); } public MyClass(int v) { value = v; }} Changing the null constructor to:
Question: I am seeking to clone an object that contains anarray of the type float[][] which in turn contains primitive types. Using super.clone() and a clonable interface in the class
Question: I would like to respond to the user as soon as the user hits a key without pressing CR. An example would be to ask a yes/no question and
Question: When you create a class, what do you create? Answer: When you enter the source code statements to define a class, you create a template that tells the compiler
Question: Please describe the primary use of the double pointer in C and C++; that is, **pointer. Answer: A pointer is simply the address of some variable. If you placed
Question: Why use classes when the same can be implemented using structures? Answer: Reasonable question. For starters, structures in C could not work like classes. Classes were needed to implement
Question: Why am I getting a type conversion error with the following method: public synchronized void setVisible(Boolean b) { setLocation(50, 50); super.setVisible(b);} Answer: You do not mention what setVisible method
Question: We may want to use the C++ string class if itis specified as part of some open standard andis not just provided by the g++ compiler. Is the string
Question: I need some help with this C++ add function.It adds a new node to the end of the list. I need it to add it to the beginning of
Question: I am reading Sams’s Learn C++ in 21 Days, and this sentence doesn’t make sense to me: “Because you have the same number of bytes for both signed and
Question: Is it possible in SQL 6.5 to write a stored procedure that has an ARRAY as an input parameter? I have done this with Oracle using Oracle Objects for
Question: How can I drop a column from a table? Is there any way to do it without recreating the table? The table in question has several dependencies that I
Question: I am having trouble converting the info in a void pointer to usable information. I have a method that returns a void pointer (void*), and in one instance (the
Question: We’d like to find a table or listing of all the character sets available in SQL Server 6.5. Is there any way to get this from the Charset files
Question: I am trying to do the SQL statements on the client side. Because I have declare int in the database, I need to convert the column before I can
Question: Is there any way to print all the source code in an application or library? Answer: You can use a product called PowerDoc to achieve this, or you could





