P********e 发帖数: 2610 | 1 data structure solution是怎么样解的
标 题: interview questions
发信站: BBS 未名空间站 (Wed Nov 19 02:47:19 2008)
What are the different ways to implement a condition where the value of x
can be either a 0 or a 1.
a logical, a arithmetic and a data structure solution | E*****7 发帖数: 128 | 2 struct MyTry {
enum BB { 0, Red};
}; | a**********s 发帖数: 588 | 3 说实话不懂题目的意思,前面的两题,貌似是"a==b", "(int)a % 2",后面一题很模糊
哈,C++的话,用类型强制转换?operator int() { return 0(or 1)... blah blah...} | l*****d 发帖数: 359 | |
|