The Latest

DevX

DOS Level error code

Question: Do you know how to return DOS level code from a program upon exit? Answer: On most systems, you can simply return a value from your main function.int main(){

DevX

User-defined string functions

Question: I am moving from other languages to Visual C++. I am trying to write a function that returns a string (or pointer to a string), which will then be

DevX

Visual C++ 5.0 compatible with C?

Question: I am studying C and C++ programming on my own. I have no previous programming experience. I am using Visual C++ 5.0 to run the following example “program 8.12”

DevX

‘80004005’ Error in Visual InterDev

Question: I am trying to view the table information by using the Data Form Wizard in Visual InterDev. I have successfully previewed the fileList.asp form that is created by the

DevX

Crashing Internet Information Server

Question: Is it possible to crash a server from an Active Server Page (ASP) if you are using an object instantiated via an ActiveX DLL installed on the server? My

DevX

Accessing private member of linked list class

Question: I have a linked list class whose private data members I want to access and initialise through a dialog box generated through the VC++ wizard. Debugging gives me an

DevX

Visual Basic or Visual C++

Question: I am interested in buying a new compiler and don’t know wether to purchase Visual Basic or Visual C++. I have taken a course in C++, but I am

DevX

How Do You Delete All Files In A Directory?

Question: Deleting all files in a directory should bea basic function; however, I can’t seem tofind a function that will do this. Can you point me to a function that

DevX

Network Programming, UDP Echo Client

When network testing, it is useful to have a client program connects to a UDP server and gets an echo of a text string that you send to the server:

DevX

Network Programming, TCP/IP Echo Client

When network testing, it is useful to have a client program that connects to a TCP/IP server and gets an echo of a text string that you send to the

DevX

Network Programming, Simple TCP/IP Server

The following program is a simple version of a TCP/IP server that responds to requests from a client and delivers files. I wrote it to be as small as possible

DevX

Network Programming, Simple Browser

With Java, you can easily write a client program that connects to a Web server and downloads an HTML file. You can also easily expand this simple program into a

DevX

Jump Back and Forth Among Procedures Quickly

My code often has a lot of nested procedure calls, which can be painful to trace while doing walk-throughs. Developers might be unaware of the “Procedure Definition” (Shift+F2) feature, which

DevX

Doubling Quotes for SQL Statements

This routine parses a string and returns an equivalent string where all the instances of a given substring are doubled. This is especially useful for doubling quotes within SQL statements

DevX

Use Pictures on Command Buttons

To use a picture on a CommandButton, you must set its Picture property and set its Style to 1 – Graphical. Otherwise, the picture will be ignored. Related Posts test

DevX

Use VB System Color Constants in API Calls

Visual Basic includes constants, such as vbActiveTitleBar and vbButtonFace, for Windows system colors, which the user might change through the Control Panel. (In VB3, these constants are defined in the

DevX

Change Tooltips Background Color

To change the ToolTips background color, open the Control Panel’s Display tool. Click on the Appearance tab. In the Item combo box, select ToolTip. Click on the little color box

DevX

The Scope of A Local Loop Counter

C++ allows you to declare variables wherever you need them, thus enabling immediate initializations. A good example is a loop counter. It can (and should) be declared inside a for-statement:

DevX

Trivial Constructors

Conceptually, compilers synthesize a default constructor for every class or struct, unless a constructor was already defined by the user. However, in certain conditions (a simple data struct, for example),

DevX

Mailto Subject Changes

It’s possible to create mailto links that include a subject line in addition to just the recipient’s e-mail address, however, not all e-mail programs support this functionality. That said, to

DevX

Garbage Collector in C++?

A garbage collector is handy, since it eliminates a big source for bugs, runtime crashes and memory leaks. However, garbage collection is not for free; it incurs additional runtime overhead

DevX

Three Flavors of Polymorphism

Polymorphism is the ability of different objects to react in an individual manner to the same message. This notion was imported from natural languages. For example, the verb “to close”

DevX

Rename a Login

Question: Is it possible to rename a login? Answer: Sorry, no. You must drop the login and then create a new one with the corrected name. Related Posts Global Pact

DevX

Log truncation

Question: My database and log keep filling up and I can’t truncate the log. Any suggestions? Answer: There are two methods to empty the transaction log. One can regularly dump

DevX

The Rationale Behind Namespaces

Some users consider the addition of namespaces to C++ as superfluous or even harmful. In order to understand why namespaces were added to the language, imagine that the file system