devxlogo

Tip Bank

Declaring References to Functions

You can declare a reference to a function, just like you can declare a pointer to a function. For example: void f(int n){ ++n;}int main(){ void (&rf) (int) = f;

More on Default Arguments

The order of evaluation of function arguments is unspecified. Consequently, parameters of a function may not be used in default argument expressions. For example, the following declaration is illegal: int

The Underlying Type of bool and wchar_t

It is guaranteed that sizeof(char), sizeof(signed char) and sizeof(unsigned char) all equal 1. Applying sizeof to any other fundamental type returns an implementation-defined value. In particular, sizeof(bool) and sizeof(wchar_t) need

Text Box and an Array

Question: I opened a ASCII text file into an array. Now I want to print the data into a text box. I tried something like this: txtResult.text = flight(i) The

MDI Forms and DLL

Question: Is there a way to host an MDI form from an ActiveX DLL in a Main application’s MDI Parent Form? Answer: Although I’ve never tried it, I don’t think