c c++ 获取 __FILE 的短文件名

创建日期: 2024-07-26 10:49 | 作者: 风波 | 浏览次数: 15 | 分类: C++

来源:https://stackoverflow.com/questions/8487986/file-macro-shows-full-path

#include <string.h>

#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
15 浏览
9 爬虫
0 评论