enum ConfigOption { CONFIG_1=1, CONFIG_2=2, CONFIG_3=3 }; ConfigOption cfg1; int i; sscanf(s, "%d", &i); cfg1 = i;. And that way you can do more comprehensive ...
確定! 回上一頁