devxlogo

Tip Bank

Making System Calls in Stored Procedures

Question: I’m writing a procedure to send an e-mail that will receive two parameters: the e-mail address of the recipient and the subject of the e-mail (e-mail content is not

Taking the Address of a Member Function

Question: class a;typedef void(a::*func)();class a{protected: int x;public: func f; void fg(){f=&a::as;}; void as();}; This code compiles in Visual C++6.0. However, Borland C 3.1 gives me the following error at line”void

References

Question: I want to know if the following declaration is possible: int *p;p= new int;int &refval= *p; Answer: It’s valid C++. You’re binding a reference to an l-value of type

Memory Addresses

Question: How do I get the addresses of primitive variables, reference variables, and objects in Java? Answer: Unlike systems programming languages like C, Java does not have pointers. Objects are

String Equality

Question: When you compare two objects through the”== operator,” Java checks for reference equality. For example, if you create two String objects with “new” keywords and initialize them with same

Cascade all the child windows of a window

The Windows API provides an handy function that lets you cascade all the child windows of another window with one single call. The effect of this function is similar to