devxlogo

Tip Bank

Shorthand for Assignment Expressions

For recursive assignment expressions such as the following: x = x+5; x= x/5;x = x * 5; C++ defines shorter versions that eliminate the need to repeat the variable’s name

Parenthesize Complex Expressions for Clarity

Although C++ clearly defines operators’ precedence, the compiler is allowed to compute subexpressions with identical precedence in a platform-defined order. Besides, many programmers don’t remember which operators have higher precedence

Referring to a Class Member

You can refer to a name of a class member only in one of the following contexts: In the scope of its class or a class derived from its class

STL Set Performance

Question: How do I improve an integer set’s performance when it is used in multithreaded environment? Answer: Many factors affect a multithreaded application’s performance: the operating system, the duration of

Initialization of Built-In Types

Question: What does the declaration int i(0) ; mean? Does C++ have a type ‘int’ constructor? And why doesn’t Visual C++ accept a char* p(0) ; declaration? Answer: This expression

Saving Form Data Within the Form Format

Question: I want users to be able to save a partially completed form, preferably to their hard disk with a user specified name, so that they can retrieve the file

Using the CDO for NTS Library With WML

Question: I have installed the library in my server but when I try to do Server.CreateObject(“CDONTS.NewMail”) in my ASP file, it returns an error: ‘ASP 0177 : 800401f3’ “Server.CreateObject failed”

Generating WML via an ASP

Question: Can I generate WML via an ASP? If so, do I no longer need a WAP server installed on top of IIS? Answer: ASP is a server-side scripting language.