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
posted @ 2017-12-09 16:25
Powered by:
博客园
Copyright © 2025 merlinzjl
Powered by .NET 9.0 on Kubernetes