c++ to c#'s "As"?
<p>How do I cast a struct to one of its base types?</p>

<p>In c# you can do that with the keyword "as" like <code>Entity as Monster</code>. How can I do this in c++?</p>

<p>This is my structure:</p>

<pre><code>struct Entity
{
    USHORT X;
    USHORT Y;
    UINT Serial;
    USHORT SpriteID;
};

struct Monster : Entity
{
    UINT UNKNOWN;
    BYTE Direction;
    USHORT Type;
};

struct Item : Entity
{
    BYTE UNKNOWN1;
    USHORT UNKNWON2;
};

struct NPC : Entity
{
    UINT UNKNOWN1;
    BYTE Direction;
    BYTE UNKNOWN2;
    BYTE NameLength;;   
    byte Name[];
};
</code></pre>
