devxlogo

Tip Bank

Optimizing Nested Loops

Several compilers need this hint from the programmer while others are clever enough to figure it out automatically. When you have nested loops, declare the counter of the most deeply-nested

Inlining Virtual Member Functions

Generally, compilers can’t inline a virtual function call if the it’s resolved dynamically. Therefore, declaring a virtual member function inline might seem pointless. However, not every call of a virtual

Assign Image and Color Backgrounds in Table Cells

Browsers Targeted: Internet Explorer 4+ In Internet Explorer, you can assign images and colors into table cells and table rows through the background-image and background-color CSS attribute within style sheets.

Keep the FrontPage 98 Extensions for VID 6

Since the arrival of FrontPage 2000 users of Visual InterDev 6 have been complaining about connection problems. The trouble isn’t actually with the FP 2000 extensions. It is the failure

Protected Inheritance Bug

Question: What is the standard rule on access specifiers associated with superclasses? Old C++ compilers would not allow protected superclasses. But, the book I’ve read about OOAD allows it. Example:

Opening Web Browsers for Multiple Pages

Question: I have seen a few tips regarding opening a Web browser using the Run command or using the ShellExecuteA external command. If I want to open multiple pages one

Jumping to the End of a Program

Question: I have a function halfway through a program, which should allow the user to quit the program, at the moment it just carries on to the next function call.

Virtual Function

Question: I’m surprised the following code doesn’t compile: class C1{public: virtual void f() { /* … */ } void f(bool) { /* … */ }};class C2 : public C1{public: void