c++ 的 static_cast

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();
}
原文地址:https://www.cnblogs.com/heben/p/5484214.html