是否有可能做到这一点?
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
}
Run Code Online (Sandbox Code Playgroud)
我知道代码可能不会去这样的事情,但怎么也去了?