typedef std::function ccHttpRequestCallback; typedef void (cocos2d::Ref::*SEL_HttpResponse)(HttpClient* client, HttpResponse* response);
收起
一个是简单的类型 typedef 另一个是函数指针的 typedef 这都是 typedef 的基本用法,其实说简单的些就是搞清楚要将什么替换为什么。 如,后续代码中使用 ccHttpRequestCallback,编译器在预编译时就会换成: ccHttpRequestCallback。使用 typedef 只是为了方便读代码!
报告相同问题?