Cpp クラス コピーコンストラクタ 新しいページはコチラ
提供: yonewiki
(→クラス コピーコンストラクタ) |
(→クラス コピーコンストラクタ) |
||
| 25行: | 25行: | ||
コピーコンストラクタは以下のように定義します。 | コピーコンストラクタは以下のように定義します。 | ||
| + | |||
| + | CopyConstructor001.h | ||
<syntaxhighlight lang="cpp" line start="1"> | <syntaxhighlight lang="cpp" line start="1"> | ||
#pragma once | #pragma once | ||
| 34行: | 36行: | ||
//★コピーコンストラクタ | //★コピーコンストラクタ | ||
CCopyConstructor001(const CCopyConstructor001& CconstrefCopyConstructor001_Para1); | CCopyConstructor001(const CCopyConstructor001& CconstrefCopyConstructor001_Para1); | ||
| − | |||
| + | CCopyConstructor001(void); | ||
~CCopyConstructor001(void); | ~CCopyConstructor001(void); | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| + | CopyConstructor001.cpp | ||
<syntaxhighlight lang="cpp" line start="1"> | <syntaxhighlight lang="cpp" line start="1"> | ||
#include "stdafx.h" | #include "stdafx.h" | ||