共用方式為


// Constructors Comment

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at -- Constructors Comment.

The // Constructors section of an MFC class declaration declares constructors (in the C++ sense) as well as any initialization functions required to really use the object. For example, CWnd::Create is in the constructors section because before you use the CWnd object, it must be "fully constructed" by first calling the C++ constructor and then calling the Create function. Typically, these members are public.

For example, class CStdioFile has three constructors, one of which is shown in the listing under An Example of the Comments.

See Also

Using the MFC Source Files
// Implementation Comment
// Attributes Comment
// Operations Comment
// Overridables Comment