hey all,
does anyone know how to convert from a string to enum? im pretty sure there's a way just cant find it right now...
thx
string to enum
-
- Posts: 33
- Joined: Sat Oct 16, 2004 11:52 pm
- Location: Earth
-
- Posts: 33
- Joined: Sat Oct 16, 2004 11:52 pm
- Location: Earth
ok, here's how i originally wanted to go about it:
string whichdriver= "OpenGL"
driverType = convertfromstringtoenum(whichdriver) pseudocode
and heres how i will instead do it
if whichdriver = "OPENGL"
driverType = EDT_OPENGL
for some reason though, my if statements are never true, so i still have to mess with it...
string whichdriver= "OpenGL"
driverType = convertfromstringtoenum(whichdriver) pseudocode
and heres how i will instead do it
if whichdriver = "OPENGL"
driverType = EDT_OPENGL
for some reason though, my if statements are never true, so i still have to mess with it...
HTML/CSS/Javascript/ASP/PHP/SQL/XML/QBasic
Next Up: C++
Next Up: C++
-
- Posts: 33
- Joined: Sat Oct 16, 2004 11:52 pm
- Location: Earth
yes, that post was pseudocode. I know how to use the == operator! lol
ive messed with the capitalization a few times, but im going to try something else...i have a series of if statements...but i was thinking of doing
if whatever
else if whatever
else if whatever
instead of if whatever
if whatever
if whatever
the former was done in another reply to one of my topics so i think i might try that out and look for a difference.
ive messed with the capitalization a few times, but im going to try something else...i have a series of if statements...but i was thinking of doing
if whatever
else if whatever
else if whatever
instead of if whatever
if whatever
if whatever
the former was done in another reply to one of my topics so i think i might try that out and look for a difference.
HTML/CSS/Javascript/ASP/PHP/SQL/XML/QBasic
Next Up: C++
Next Up: C++