博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
很有用的系统宏
阅读量:2300 次
发布时间:2019-05-09

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

顺便提一下,两个很有用的系统宏,一个是"__FILE__",一个是"__LINE__",分别表示,所在的源文件和行号,当你调试信息或是输出错误时,可以使用这两个宏,让你一眼就能看出你的错误,出现在哪个文件的第几行中。这对于用C/C++做的大工程非常的管用。

// file_line.cpp : Defines the entry point for the console application.//#include "stdafx.h"int main(int argc, char* argv[]){	printf(__FILE__);printf("\n");	printf("%d",__LINE__);printf("\n");	printf(__DATE__);printf("\n");	printf(__TIME__);printf("\n");	return 0;}/*D:\My Documents\vc6_Projects\file_line\file_line.cpp9May 21 201314:05:43Press any key to continue*/
"******                  建立日期:",__DATE__,"                 ******\r\n","******                   建立时间:",__TIME__,"                   ******\r\n",

转载地址:http://muuib.baihongyu.com/

你可能感兴趣的文章
系统rm的处理机制
查看>>
/proc/sys/vm参数(转)
查看>>
valgrind是个好工具
查看>>
配置samba服务器
查看>>
重启系统
查看>>
bigtable笔记
查看>>
tfs文件系统笔记
查看>>
存储系统元数据性能优化笔记(一)
查看>>
debian命令集(一)
查看>>
debian源配置
查看>>
VMware下Linux网络配置攻略
查看>>
debian命令集(二)
查看>>
step by step学习LAMP配置
查看>>
Django入门
查看>>
ceph学习(二)——设计架构
查看>>
Google(一)——GFS
查看>>
Google(二)——Bigtable
查看>>
zookeeper
查看>>
step by step入门LAMP配置
查看>>
debian命令集(三)
查看>>