打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
VC中2个浮点数如何比较大小?
  • 如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。
    比如读第一个值

    char number[10];
    float a;
    GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini")
    a=atof(number);

    其中xxx.ini为你要读取的文件名。
    具体的函数参数可以参阅MFC的帮助。
    ,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,,如果用VC写程序可以使用MFC中的GetPrivateProfileString这个函数先读出字串,然后再转成浮点数。 ,比如读第一个值 ,,char number[10]; ,float a; ,GetPrivateProfileString("AABBBOXINFO", "AABBBoxScale", "0", number, 10, "xxx.ini") ,a=atof(number); ,,其中xxx.ini为你要读取的文件名。 ,具体的函数参数可以参阅MFC的帮助。,

    09-10-26 | 添加评论

  • 0

    wk326um16

    编辑框属性不设置为NUMBER,在为这个控件添加变量时选择Double类型

    补充:但是当你UpdateData()时,会提示"请输入XXXXX"

    再有,如果你想完全限制的话,那就自己写代码控制.

    09-10-26 | 添加评论

  • 本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
    打开APP,阅读全文并永久保存 查看更多类似文章
    猜你喜欢
    类似文章
    GetPrivateProfileString()函数
    VC中INI文件读写 - 平淡才真实 - JavaEye技术网站
    VC6 MFC一个类(登录框)控制另一个类(主对话框)的按钮
    利用GetPrivateProfileString读取配置文件(.ini)
    用vc 穷举windows应用程序密码(上)
    C++读取INI文件
    更多类似文章 >>
    生活服务
    热点新闻
    分享 收藏 导长图 关注 下载文章
    绑定账号成功
    后续可登录账号畅享VIP特权!
    如果VIP功能使用有故障,
    可点击这里联系客服!

    联系客服