c 语言格式输出 浮点数 不要用 整形输出 --教训
2012-04-01 21:13
302 查看
融合insert 版本,其实前面两个都没有出错的,在第三个版本,爆出输出
串的奇怪问题。
当前总结:
66
问什么 就在这里报错,两次没有爆出错误
看了截图:其实 控制输出格式符号的错误i, 会出现连带错误
printf("\n %lf %d : time cutoffvalue\n",(EndTime- BegTime)*1000.0 /(double)CLOCKS_PER_SEC ,cutoff);
//for test..后面可以移除。
printf("\n a %lf %d : time cutoffvalue\n",(EndTime- BegTime)*1000.0 /CLOCKS_PER_SEC ,cutoff);
printf("\n b %ld %d : time cutoffvalue\n",(EndTime- BegTime)*1000.0 /CLOCKS_PER_SEC ,cutoff);
printf("\n c %ld : time \n",(EndTime- BegTime)*1000.0 /CLOCKS_PER_SEC );
printf("\n d %lf : time \n",(EndTime- BegTime)*1000.0 /CLOCKS_PER_SEC );
串的奇怪问题。
当前总结:
66
问什么 就在这里报错,两次没有爆出错误
看了截图:其实 控制输出格式符号的错误i, 会出现连带错误
printf("\n %lf %d : time cutoffvalue\n",(EndTime- BegTime)*1000.0 /(double)CLOCKS_PER_SEC ,cutoff);
//for test..后面可以移除。
printf("\n a %lf %d : time cutoffvalue\n",(EndTime- BegTime)*1000.0 /CLOCKS_PER_SEC ,cutoff);
printf("\n b %ld %d : time cutoffvalue\n",(EndTime- BegTime)*1000.0 /CLOCKS_PER_SEC ,cutoff);
printf("\n c %ld : time \n",(EndTime- BegTime)*1000.0 /CLOCKS_PER_SEC );
printf("\n d %lf : time \n",(EndTime- BegTime)*1000.0 /CLOCKS_PER_SEC );
相关文章推荐
- 计算给定字符串中每个字符出现的次数,并以指定格式输出,例如aabbbc输出a2b3c1(java语言)
- BCB中用FormatFloat函数控制浮点数据的输出格式
- 关于格式控制 实例:格式化输出浮点数
- c语言格式输出
- C/C++中浮点数输出格式问题
- oc语言的时间输出格式
- 从C中变化过来的各种语言的printf输出格式
- c语言printf()输出格式大全
- C语言基础知识:printf的输出格式
- 位模式转换-----C++实现浮点数存储格式输出
- C 语言格式输出 %hd,%hu分别是 短整型 和 无符号的短整型。
- 汇编语言:输入两个数,不大于30,有提示,比较两个数字,如果相等,计算和,如果不相等,计算平均值,并且都要以2进制的格式输出,按照升序输出,计算两个数字各占和的百分比,并且按照“%”的格式输出。
- go语言 日志格式输出
- C语言基础知识:printf的输出格式
- C 语言中的输出函数printf中的%n格式的含义
- C++如何输出特定格式浮点数
- 关于printf()函数和浮点数 输出格式汇总
- C语言基础——%X(十六进制)的几种不同输出格式
- C++学习笔记(一)--整形,std输出,浮点数,数组,字符串,结构,指针,循环
- C语言文件读写的时候尽量不要使用文本格式