摘要: Pimpl(Pointer to implementation)很多同学都不陌生,但是从原始指针升级到C++11的独占指针std::unique_ptr时,会遇到一个incomplete type的报错,本文来分析一下报错的原因以及分享几种解决方法~ 问题现象 首先举一个传统C++中的Pimpl的例 阅读全文
posted @ 2020-11-30 17:18 MistEO 阅读(2142) 评论(0) 推荐(0)
摘要: 在C标准库中提供了字符串拷贝函数strcpy,而微软则为为它提供了一个更安全的版本strcpy_s,其函数原型为 errno_t __cdecl strcpy_s( char* _Destination, rsize_t _SizeInBytes, char const* _Source ); 分享 阅读全文
posted @ 2020-10-23 17:41 MistEO 阅读(1295) 评论(0) 推荐(0)