[ create a new paste ] login | about

Link: http://codepad.org/hsVE57ZS    [ raw code | output | fork ]

C++, pasted on Jun 6:
#include <iostream>
using namespace std;

enum eType{
    cTest = 1
};

namespace testspace{
    class cTest{
        public:
        int a;
    };
}


class cData{
    public:
    testspace::cTest test;
};

int main(){
    cData data;
    data.test.a = 5;
    cout<<data.test.a<<endl;
    return 0;
}


Output:
1
5


Create a new paste based on this one


Comments: