Cpp クラス アクセス指定子 新しいページはコチラ
提供: yonewiki
(→クラス アクセス指定子) |
(→クラス アクセス指定子) |
||
| 36行: | 36行: | ||
<syntaxhighlight lang="cpp" line start="1"> | <syntaxhighlight lang="cpp" line start="1"> | ||
class Access_Specifiers001{ | class Access_Specifiers001{ | ||
| − | + | int m_nValue; //★1.メンバ変数 省略されている場合はprivate: | |
| − | public://この宣言からpublic: | + | wchar_t m_wcUnit; |
| − | + | ||
| − | + | public: //★2.この宣言からpublic: | |
| + | void Set_m_nValue(int nSetValueP);//メンバ関数 | ||
| + | int Get_m_nValue(); | ||
| + | |||
| + | int mpub_nValue; | ||
| + | |||
| + | protected: //★3.この宣言からprotected: | ||
| + | void m_nValue1000x(); | ||
| + | void m_nValuePermil(); | ||
| + | |||
| + | private: //★4.明示的なprivate: | ||
| + | int m_nValue2; | ||
| + | |||
| + | |||
| + | CAccess_Specifiers001(void); | ||
| + | ~CAccess_Specifiers001(void); | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||