問題:
Is it possible to do this?是否有可能做到這一點?
double variable;
variable = 5;
/* the below should return true, since 5 is an int.
if variable were to equal 5.7, then it would return false. */
if(variable == int) {
//do stuff
}
I know the code probably doesn't go anything like that, but how does it go?我知道代碼可能不會去這樣的事情,但它是如何走?
解決方案:
參考一: https://en.stackoom.com/question/fX3Q參考二: https://stackoom.com/question/fX3Q