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
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
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
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
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
Private Declare Function ExtFloodFill Lib “GDI32” (ByVal hDC As Long, _ ByVal X As Long, ByVal Y As Long, ByVal colorCode As Long, _ ByVal fillType As Long) As LongConst
Private Declare Function GetDesktopWindow Lib “user32” () As LongPrivate Declare Function GetDC Lib “user32” (ByVal hWnd As Long) As LongPrivate Declare Function GetDeviceCaps Lib “gdi32” (ByVal hDC As Long, _
Private Declare Function OleTranslateColor Lib “OLEPRO32.DLL” (ByVal OLE_COLOR _ As Long, ByVal HPALETTE As Long, pccolorref As Long) As Long’ convert a VB color constant to a COLORREF’ accepts both
‘ get the index of the active OptionButton in an arrayFunction OptionButtonIndex(optArray As Object) As Integer Dim ctrl As Control ‘ this means not found OptionButtonIndex = -1 For Each
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