inline const char* const_basename(const char* filepath)
{
const char* base = strrchr(filepath, '/');
#ifdef _WIN32 // Look for either path separator in Windows
if (!base)
base = strrchr(filepath, '\\');
#endif
return base ? (base + 1) : filepath;
}


#define ERROR_MSG_HEAD (std::string("[") + const_basename(__FILE__) + "(" + std::to_string(__LINE__) + ") " + __FUNCTION__ + "] ")

相关文章:

  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2022-02-24
  • 2021-10-30
相关资源
相似解决方案