devxlogo

March 6, 2001

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

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