Tip Bank

DevX - Software Development Resource

Converting wchar_t to char

In addition to the widen() member function, the iostream framework supports the narrow() member function which performs the reverse operation, i.e., converting a wide character to its corresponding char value.

DevX - Software Development Resource

Verifying a Destructor’s Invocation

Conceptually, destructors of global objects are called after main() has exited. For this reason, many debugging and memory checking tools are confused and report phantom memory leaks or warn about

DevX - Software Development Resource

std::string and null Characters

Unlike C-strings, a std::string object may contain null characters in the middle of its internal buffer. For example: std::string s=

DevX - Software Development Resource

Self-referential Inheritance

Consider the following example: class A : public list < A >{ // …}; Does your compiler accept it? According to the Standard, using an incomplete type as a template

DevX - Software Development Resource

Viewing Error Outputs From Java Applets in IE

The file Java/Javalog.txt in the Windows directory (i.e. C:windowsJava.Javalog.txt for windows and C:winntJavaJavalog.txt for NT) contains information for the last applet that was loaded by Internet Explorer. This file contains

DevX - Software Development Resource

How to Access Cookies Set at the Client Side

Class javax.servlet.http.cookies can be used to access cookies on the client side. The following code demonstrates this technique. The code also checks for the cookie names in order to access