
c++编程技巧
yunshouhu
爱Java,更爱Android,学VC,搞c/c++的我。专注移动安全,游戏安全,逆向安全!十年戎马成神路,君临天下风雷动! https://github.com/yunshouhu
展开
-
c++ 类型转换
C风格的强制类型转换(Type Cast)很简单,不管什么类型的转换统统是: TYPE b = (TYPE)a。 C++风格的类型转换提供了4种类型转换操作符来应对不同场合的应用。 const_cast,字面上理解就是去const属性。 static_cast,命名上理解是静态类型转换。如int转换成char。 dynamic_cast,命名上理解是动态类型转换。如子类和父类之间的多原创 2013-04-18 09:30:59 · 739 阅读 · 0 评论 -
c++ 类型转换2
1.IP 控件的IP值转化为CString类型 byte m_bIPAddress[4]; CStringFileServerIP1,FileServerIP2,FileServerIP3,FileServerIP4,FileServerIP; CIPAddressCtrl *c=(CIPAddressCtrl*)(GetDlgItem(IDC_IPADDRE原创 2013-04-18 10:25:29 · 1048 阅读 · 1 评论 -
c/c++库资料
1、C++标准库在线资料实例,类似window api的msdn: http://www.cplusplus.com/reference/ctime/time/ http://www.cplusplus.com/reference/ 2、The GNU C Library (glibc) http://gnu.april.org/software/libc/libc.h原创 2014-12-29 11:54:02 · 1187 阅读 · 0 评论 -
c++技巧
1、获取当前系统时间: SYSTEMTIME systime; GetLocalTime(&systime); char str_time_name[MAX_PATH]; sprintf(str_time_name,"%d-%d-%d %d:%d:%d.jpg",systime.wYear,systime.wMonth,systime.wDay,systime.wHour,systi原创 2013-03-05 11:56:56 · 2072 阅读 · 0 评论 -
C++ RTTI使用
RTTI.h #ifndef _RTTI_H_ #define _RTTI_H_ #include template class RTTIInfo { public: RTTIInfo() { typeName = typeid(T).name(); hashTypeName = typeid(T).hash_code(); } const char* toString()原创 2016-08-28 19:48:23 · 893 阅读 · 0 评论