devxlogo

Tip Bank

Namespaces and the C Standard Library

The C++ Standard requires that the C standard library be declared in namespace std, just as the C++ Standard Library. Thus, if you #include and call printf(), you should use

Arrays of Pointers to Members

You can create an array of pointers to member just as you would create arrays of any other type. The following example creates an array of pointers to member functions

Filtering Input in scanf()

You can force scanf() to read only specific characters from the input source while ignoring all the rest. Alternatively, you can force scanf() to read all input characters except the

Where are std::min() and std::max()?

The Standard Library defines the two template functions std::min() and std::max() in the header. In general, you should use these template functions for calculating the min and max values of

Create multiple controls of same type

When you plan to create more control of the same type you can save some clicks by selecting the control on the Toolbox with the mouse while you press the