So. I am trying to convert a uint16\_t (16 byte int) to class. To get the class member varaible. But it is not working as expected.

```cpp

class test{
public:
    uint8_t m_pcp : 3; // Defining max size as 3 bytes
    bool m_dei : 1;
    uint16_t m_vid : 12; // Defining max size as 12 bytes

public:
    test(uint16_t vid, uint8_t pcp=0, bool dei=0) {
        m_vid = vid;
        m_pcp = pcp;
        m_dei = dei;
    }
};

int main() {
    uint16_t tci = 65535;
    test t = (test)tci;

    cout<<"pcp: "<<t.m_pcp<<" dei: "<<t.m_dei<<" vid "<<t.m_vid<<"\n";
    return 0;
}

```

Expected output:

```
pcp:1  dei: 1 vid 4095

```

The actual output:

```
pcp:  dei: 0 vid 4095

```

Also,

```
cout<<sizeof(t)

```

returns 2. shouldn't it be 4?

Am I doing something wrong?