大约有 16,000 项符合查询结果(耗时:0.0268秒) [XML]
cout保留两位小数输出 - C/C++ - 清泛网 - 专注C/C++及内核技术
...tream> include <iomanip> std::setprecision函数需要引入该头文件int main(){ double dval C++ std::cout输出2位小数的代码:
#include <stdio.h>
#include <iostream>
#include <iomanip> //std::setprecision函数需要引入该头文件
int main() {
double dval = 123....
浮点数在内存中的表示 - C/C++ - 清泛网移动版 - 专注IT技能提升
...子:
#include "stdafx.h"
#include <string.h>
#include <limits>
int _tmain(int argc, _TCHAR* argv[])
{
float f1 = FLT_MIN;
printf("%f\n", f1);
f1 = FLT_MAX;
printf("%f\n", f1);
// 0 10000101 11110110000000000000000
void * p = (void *)0x42fb0000;
memcpy(&f1, &p, 4);
printf...
ATL CComPtr和CComQIPtr详解 - C/C++ - 清泛网移动版 - 专注IT技能提升
...值给CComQIPtr的时候,CComQIPtr会自动的调用接口指针的QueryInterface接口,来获得对应的正确的接口指针。CComPtr和CComQIPtr是智能接口指针类,它们在销毁的时候,不需要手动去释放接口指针,在赋值的时候,也不需要手动的AddRef,在...
char类型移动跨平台踩过的坑 - C/C++ - 清泛网移动版 - 专注IT技能提升
char类型移动跨平台踩过的坑CFLAG-fsigned-charchar强转int时,发现在x86平台下是按照有符号处理的,但是在ARM32下被当成了无符号导致问题,ARM64正常有符号。经调查,在PC上,char类型默认为signed-char,但是在一些嵌入式设备
char强转...
浮点数在内存中的表示 - C/C++ - 清泛网移动版 - 专注IT技能提升
...子:
#include "stdafx.h"
#include <string.h>
#include <limits>
int _tmain(int argc, _TCHAR* argv[])
{
float f1 = FLT_MIN;
printf("%f\n", f1);
f1 = FLT_MAX;
printf("%f\n", f1);
// 0 10000101 11110110000000000000000
void * p = (void *)0x42fb0000;
memcpy(&f1, &p, 4);
printf...
C#定点任务代码 类似Windows计划任务(健壮性高) - 更多技术 - 清泛网移动...
...od();
// 更新下次执行间隔
SetNextOnceDoInterval();
if (DateTime.Now.ToString("HH:mm").CompareTo(onceDoStr.Trim()) >= 0)
{
// 可能由于系统原因导致触发过早的,不执行
onceDoMain();
...
ATL CComPtr和CComQIPtr详解 - C/C++ - 清泛网移动版 - 专注IT技能提升
...值给CComQIPtr的时候,CComQIPtr会自动的调用接口指针的QueryInterface接口,来获得对应的正确的接口指针。CComPtr和CComQIPtr是智能接口指针类,它们在销毁的时候,不需要手动去释放接口指针,在赋值的时候,也不需要手动的AddRef,在...
sqlite 命令行创建一个空库 - 数据库(内核) - 清泛网 - 专注C/C++及内核技术
...势,比touch创建一个空文件好。$sqlite3 foo db "create table t(f int); drop table t;"可以通过以下方 SQLite创建一个空白的数据库,具有被识别为有效的SQLite数据库的优势,比touch创建一个空文件好。
$sqlite3 foo.db "create table t(f int); drop tabl...
char类型移动跨平台踩过的坑 - C/C++ - 清泛网 - 专注IT技能提升
char类型移动跨平台踩过的坑CFLAG-fsigned-charchar强转int时,发现在x86平台下是按照有符号处理的,但是在ARM32下被当成了无符号导致问题,ARM64正常有符号。经调查,在PC上,char类型默认为signed-char,但是在一些嵌入式设备
char强转...
浮点数在内存中的表示 - C/C++ - 清泛网移动版 - 专注IT技能提升
...子:
#include "stdafx.h"
#include <string.h>
#include <limits>
int _tmain(int argc, _TCHAR* argv[])
{
float f1 = FLT_MIN;
printf("%f\n", f1);
f1 = FLT_MAX;
printf("%f\n", f1);
// 0 10000101 11110110000000000000000
void * p = (void *)0x42fb0000;
memcpy(&f1, &p, 4);
printf...