Re: Python to c++ conversion problem

2005-03-23 Thread Jerry Coffin
Akdes Serin wrote: > I have a code in python like > if eval('player.moveRoom(SeLinuxMud.Direction.' + x + ')'): # moveRoom > function takes Direction enum as a parameter > > When I am trying to write this code in c++ > if (player->moveRoom(s[1])) //s[1] is a string so it outputs an error > because

Re: Python to c++ conversion problem

2005-03-23 Thread Ivan Vecerina
"Akdes Serin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have a code in python like > if eval('player.moveRoom(SeLinuxMud.Direction.' + x + ')'): # moveRoom > function takes Direction enum as a parameter > > When I am trying to write this code in c++ > if (player->moveRoom(s[1]

Re: Python to c++ conversion problem

2005-03-23 Thread Ahmed MOHAMED ALI
Hi, Convert the string to int then cast the int to enum with static_cast. Ahmed "Akdes Serin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a code in python like > if eval('player.moveRoom(SeLinuxMud.Direction.' + x + ')'): # moveRoom > function takes Direction enum as a pa