static specifier
提供:cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
クラス内では、特定のインスタンスにバインドされていないメンバーを宣言.
Original:
Inside a class, declares members not bound to specific instances.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目次 |
[編集] 構文
| static class_attribute | |||||||||
| static class_method | |||||||||
[編集] ノート
#静的属性は、クラスの外で定義する必要があります
Original:
# static attributes must be defined outside the class
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
#静的整数定数属性はインライン(C + + 11時まで)を定義することができます
Original:
# static constant integral attributes can be defined inline (C + + 11時まで)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
#静的メソッド内で何NJポインタはありません
Original:
# inside static methods there is no NJポインタ
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
#静的メソッドはcvなど他のクラス固有の関数指定子を持つことができない、またはvirtual明示的なオーバーライド
Original:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] も参照してください
[編集] 例
struct C { static void foo(); static int n; static const int m = 16; // inline inizialization }; int C::n = 0; // static attribute definition void C::foo() { // no reference to non-static members/methods can occur here }