Mail Archives: djgpp/1999/07/28/09:21:06.1
Could be offtopic, but It I want to detect if there is a letter in my
character boxes but atoi returns zero if there is a letter. This is poorly
designed because I can't use the number 0 when converting the integer
string to an int variable. I thought this would work but it didn't so could
anyone type some code to do so?
if (((t_box_r == "0") || ((color.r == atoi(t_box_r)) != 0)) &&
((t_box_g == "0") || ((color.r == atoi(t_box_g)) != 0)) &&
((t_box_b == "0" || ((color.r == atoi(t_box_b)) != 0))) {
do stuff!!!!!....
}
Thanks, for the help, I think there is a better way to structure the
conditionals but it's got me...
from Dan Gold
-=-=[CATACOMB ABYSS]=-=-
http://www.geocities.com/SiliconValley/Port/1547/
- Raw text -