码迷,mamicode.com
首页 >  
搜索关键字:cast    ( 1368个结果
C++ static_cast const_cast dynamic_cast 和reinterpret_cast的区别
1、static_cast Operator The expression static_cast ( expression ) converts expression to the type of type-id based solely on the types present in the ....
分类:编程语言   时间:2014-11-19 22:11:04    阅读次数:245
C++学习之显示类型转换与运行时类型识别RTTI
static_cast const_cast reinterpret_cast 运行时类型识别(RTTI) dynamic_cast 哪种情况下dynamic_cast和static_cast使用的情况一样? 什么情况下使用dynamic_cast代替虚函数? typeid
分类:编程语言   时间:2014-11-19 17:43:44    阅读次数:268
sql 关键字的用法
coalesce( T.GoodsCode,'0') 若 T.GoodsCode 为NULL 这 用0替换round(S.SaleEarning,2) 保留两位小数SUBSTRING(zb.accTime,9,2) 截取字符 从第9个开始截取2个cast(SUBSTRING('11111111111...
分类:数据库   时间:2014-11-19 07:06:39    阅读次数:366
vc6.0转vs2005出现的问题
在将vc6.0程序转换到vs2005或者vs2008、vs2010时提示:error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CStaticLink::* )(CPoint)' to 'LRESULT (__thisc...
分类:其他好文   时间:2014-11-18 23:00:35    阅读次数:200
自己实现的Boost库中的lexical_cast任意类型转换
知道了C++的I/O设施之后,这些就变的很简单了。如果你经常使用,时间长了就会有感觉。这个事情是多此一举吗?就当是练习吧,知道原理之后,你会觉得用起来更舒畅,更喜欢C++了。 #include #include #include #include #include #include using namespace std; template Result lexical_cast(...
分类:其他好文   时间:2014-11-17 09:11:26    阅读次数:196
offsetof的使用
#include#defineoffsetof(TYPE,m) (size_t)&reinterpret_cast((((TYPE*)0)->m))宏功能:获得一个结构体变量成员在此结构体中的偏移量。通过获取偏移量取得结构体的地址/* Takes a pointer to a member vari...
分类:其他好文   时间:2014-11-16 12:00:36    阅读次数:212
将时间转换成数字,把数字转换成时间,均匀取一定时间间隔(比如每91秒取一条记录)内的符合条件的记录
将时间转换成数字,把数字转换成时间,均匀取一定时间间隔(比如每91秒取一条记录)内的符合条件的记录/****** Script for SelectTopNRows command from SSMS ******/SELECT [id] ,[tagDate],CAST(tagdate as flo...
分类:其他好文   时间:2014-11-15 17:07:23    阅读次数:127
Oracle varchar 字段排序问题
数据库字段:想要的结果:实际查询的结果:解决方法:使用CAST函数把varchar2转为int类型order by CAST(CODE AS INTEGER)
分类:数据库   时间:2014-11-13 16:12:01    阅读次数:166
x86_64 xercexc: error: cast from 'const void*' to 'long int' loses precision [-fpermissive]
编译x86_64版本xerces-c-2.8.0: 修改src/xercesc/util/HashPtr.cpp: unsigned int HashPtr::getHashVal(const void *const key, unsigned int mod                                  , MemoryManager* const) {  retu...
分类:其他好文   时间:2014-11-12 14:59:45    阅读次数:398
SQL去掉小数点有效数字后的所有0
原文:SQL去掉小数点有效数字后的所有0 第一种方法 select cast(2.5000000000000 as real) select cast(2 as real) select cast(2.00000 as real) 第二种方法 CREATE function [dbo].[Clear...
分类:数据库   时间:2014-11-12 01:59:07    阅读次数:207
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!