merlinzjl

导航

2017年12月9日 #

C++中的四种类型转换

摘要: //1.常见的类型转换,使用static_cast float f = 1.234; int i =static_cast<int>(f);//等价于 int i = (int)f; //2.const_cast,将常量指针(指针指向的地址的值不能变)转变成非常量指针 int a = 1; cons 阅读全文

posted @ 2017-12-09 16:25 merlinzjl 阅读(142) 评论(0) 推荐(0) 编辑