How to convert Unit* to player*, if Unit is a Player

Hi, i begin in c++ and for my first script, i need to use Additem() function which is in player method, but i have just a unit pointer.

Code :

    void JustDied(Unit* killer)
    {
        if(SpellCasted && killer->GetTypeId(TYPEID_PLAYER))
        [B]  Player* Pplayer = killer->[/B] ??
        }
    }

Thanks a lot, for your help.

Killer–>ToPlayer()

Thanks Subv !! Resolved.