Tip Bank

DevX

Frame relay basics

Question: Please describe the basic features of frame relay, and how this technology is best used. Answer: Frame relay is a quickly expanding technology that is helping the internetworking industry

DevX

Inheritance design

Question: Suppose I’ve got the following class hierarchies:Surface_PlotContourSurface_Plot, child of Surface_PlotSurface_DataGridSurface_Data, child of Surface_DataSurface_Plot contains a Surface_Data object, ContourSurface_Plot contains a GridSurface_Data object.What is the most elegant way to arrange

DevX

File handles/pointers

Question: In C, I use the FILE *filename. As a beginning C++ programmer, I open streams for reading and writing inside the main() function, but when I try to work

DevX

Memory allocation at compile time

Question: Consider the following piece of code:#include /* C++ String class */static String s(“hello”);main() { // … your code s += ” world”; // …}Question: String class uses the new

DevX

Possible to read integers as integers?

Question: Is it possible to read integers from a file as integers, or must I read them as strings and then convert them to integers? Answer: In C++ the streams

DevX

Reference Counted Implementation

Question: For a reference counted implementation, how is the operator+= member function coded? The function receives (const String & rhs) and returns String &. The returned String &

DevX

Friend class and function

Question: I need to know what the class or function called “friend” is. My teacher explained it in class, but I don’t quite understand how to call it and declare

DevX

Using self-defined libraries

Question: I am using Borland Turbo C++ 3.1 and I can’t figureout how to use my self-defined libraries. I’ve used”#include” but I get an error every time I try touse

DevX

Inheritance and parameter pushing

Question: Why do I need private inheritance in C++?Is it true that (in C++) function parameters are pushed onto the stack from right to left? If so, why? Answer: Use