Staticまとめ

==========source==========

#include --

namespace test{

const int Test::aaa = 0;  // 実体がソース側にある定数
int Test::ccc = 0;           // 初期化

const int ddd = 2;          // externで参照できる変数
static const int eee = 3; // externで参照できない(そのファイルからしか呼び出せない変数)

int hhh = 4;


Test::Test(): constVar(0) // fffを初期化
{
}


}

==========header==========

Last updated