加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

VC停止位的问题

(2023-01-04 17:47:07)
分类: VC
原来是这样的:
if(temp_str == "1")
stopbit = ONESTOPBIT;
else if(temp_str == "1.5")
stopbit = ONE5STOPBITS;
else if(temp_str == "2")
stopbit = TWOSTOPBITS;
经调试不对。
改为如下:
if(0==strcmp(temp_str, "1"  ))
        stopbit = ONESTOPBIT;
else if(0==strcmp(temp_str, "1.5"))
        stopbit = ONE5STOPBITS;
else if(0==strcmp(temp_str, "2"  ))
        stopbit = TWOSTOPBITS;

0

阅读 收藏 喜欢 打印举报/Report
前一篇:流水账
后一篇:流水账
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有