以下の内容はhttps://adragoona.hatenablog.com/entry/2015/09/01/165142より取得しました。


C++でClass内のtypedefにもpublic, privateは適用される

タイトル通りだが、以下がサンプル。

テンプレートを使う時に重要になるのでメモ。

class Test {
private:
    typedef double private_real;

public:
    typedef double public_real;
};


int main(int argc, char const* argv[])
{   

    Test::public_real public_real = 1.0;
    //Test::private_real private_real = 2.0; //compile error
    
    return 0;
}



以上の内容はhttps://adragoona.hatenablog.com/entry/2015/09/01/165142より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14