c++ 的 static_cast
2024-09-20 22:46:16
http://www.cnblogs.com/pigerhan/archive/2013/02/26/2933590.html
#include "Person.h"
#include <string>
#include <iostream> Person::Person()
{ }
void Person::sayHello()
{
std::cout << "hello world";
} int main(void)
{
Humankind humanKind = Humankind();
humanKind.sayHello(); Person person = static_cast<Person>(humanKind); humanKind.sayHello();
person.sayHello();
std::cin.get();
}
最新文章
- poj1200-Crazy Search(hash入门经典)
- 关于MFi认证你所必须要知道的事情
- 【转载】MySQL启多个实例
- Gunicorn 文档翻译
- 使用ReflectionTestUtils解决依赖注入
- Android双击返回键退出Activity的两种方法
- Angularjs^1.2.9 搜索关键字高亮显示
- 小故事理解TCP/IP连接时的三次握手
- ReactiveCocoa应用篇(二)
- LaTex计数器
- JMeter&#160;JMeter远程分布式联机性能测试
- Cocos2d-x CCControlPotentiometer之圆形音量button及特效
- HTML标签播放MP4视频
- 解决Tax discount configure 报出异常
- Linux ulimit和动态修改MySQL最大线程数限制
- 模拟alert,confirm 阻塞状态
- Web Service Error wsse:InvalidSecurity Policy Requires Integrity (Doc ID 1370736.1)
- 用ldapsearch验证LDAP认证信息
- python-使用递归实现二分法
- [Asp.net本质论]重新认识url