当c ++返回true / false,如果数据类型是整数或双精度值 [英] when c++ return true / false if the data type is integer or double value

查看:137
本文介绍了当c ++返回true / false,如果数据类型是整数或双精度值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在将项目从c ++迁移到c#。任何人都可以让我知道当
c ++返回true或false的整数或双数据类型值。

we are migrating project from c++ to c#. Can any one let me know when c++ return true or false for integer or double datatype value.

int a=3; or int a=-3; ... etc

if(a) //it will return true or false
{

}
else
{

}


推荐答案

c $ c> $

It returns false for 0 and true otherwise.

这篇关于当c ++返回true / false,如果数据类型是整数或双精度值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆