C语言中的__FILE__、__LINE__和__func__等预定义跟踪调试
发布日期:2021-07-01 06:05:29 浏览次数:3 分类:技术文章

本文共 224 字,大约阅读时间需要 1 分钟。

 

//helloworld.c#include 
int main (){ printf("[file:%s]:[function:%s]:[line:%d]\n",__FILE__,__FUNCTION__,__LINE__); return(0);}
//编译并运行gcc helloworld.c./a.out
//执行之后的结果[file:helloworld.c]:[function:main]:[line:5]

 

转载地址:https://pantang.blog.csdn.net/article/details/116261006 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Linux 文件系统 -- 简述几种文件类型
下一篇:fopen()、fread()、fwrite()、fseek()、fclose();

发表评论

最新留言

表示我来过!
[***.240.166.169]2024年05月02日 08时40分54秒