devxlogo

Tip Bank

Nested Class and Forward Declarations

You cannot forward declare a nested class. For this reason, the following code will not compile: // assuming class B is nested in class A int main() { class A::B;

Create a Link to the Previous Page Using ASP

With pages that are generated dynamically, you can’t provide a hardcoded link back to the previous page. However, ASP often provides you with the name of the page that contained

Create Line Breaks in the VID Label Object

The Visual InterDev label script object is a quick way to display text on your Web pages. Trouble is, the data from your recordset may contain line breaks that the

Debugging Macros

Question: In our project we are using many long macros. How we can debug them (setting breakpoints, etc.)? Is there any solution for that in Visual C++ 6.0? Answer: Unfortunately,

Default Arguments to Functions

Question: Is it considered acceptable to use default argument initializers both in a definition of a function (e.g., void foo(int x =10) {…}) as well as its declaration? Stroustrup, in

Array Initialization

Question: I’ve always used memset() in C to do char array initialization, but in C++ is it normal/acceptable practice to initialize a char array during declaration using this syntax? char

Returning a Value

Question: When executing a system call, how can I return a value back? My program will already return a value back. Example: String blah = system(“some command”); Is this correct?