#error和line
#error message ----注:message不需要用双引号包围,
#error 编译指示字用于自定义程序特有的编译错误消息类似的,
#warning用于生成编译警告,但不会停止编译。
在linux终端定义 gcc -Dadroid40 test.c ---在终端定义常量方法,后执行a.out,结果正常输出,
定义宏常量:gcc -DCOMMAND=\"Test\" error.c -o error---注:定义一个宏常量 --- “字符串”。
在代码里定义 定义宏常量:#define COMMAND “Test”
#line的用法:
#line 用于强制定新的行号和编译文件名,并对源程序的代码重新编号,
用法:#line number filename 注:filename可省略,
#line 编译指示字的本质是重定义_line_和_FILE_
#include<stdio.h>
#define CONST_NAME1 "TEST"
#defineCONST_NAME2 "Test"
void f();
int main ()
{
printf("%s\n",CONST_NAME1);
printf("%s\n",CONST_NAME2);
printf("%s\n",_LINE_);
printf("%s\n",_FILE_);
f();
return 0;
}
#line 1 “dingpeifei”
void f()
{a+b; }
#line 用于程序员找错误,有错误代码会有提示:从#line 1“dingpeifei”下一行开始计数,容易找到错误代码;
#error和line的更多相关文章
- Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
启动tomcat, 出现, ( 之前都是好好的... ) [lk ] ERROR [08-12 15:10:02] [main] org.springframework.web.context.Con ...
- 关于xml加载提示: Error on line 1 of document : 前言中不允许有内容
我是在java中做的相关测试, 首先粘贴下报错: 读取xml配置文件:xmls\property.xml org.dom4j.DocumentException: Error on line 1 of ...
- error on line 1 at column 6: XML declaration allowed only at the start of the document
This page contains the following errors: error on line 1 at column 6: XML declaration allowed only a ...
- "fatal: protocol error: bad line length character: No This"
git clone 远程地址时候出现 "fatal: protocol error: bad line length character: No This" 错误 在stackov ...
- Parse Fatal Error at line 41 column 24: 元素类型 "url-pattern" 必须由匹配的结束标记 "</url-pattern>" 终止
1.错误描述 严重: Parse Fatal Error at line 41 column 24: 元素类型 "url-pattern" 必须由匹配的结束标记 "< ...
- (转)Windows 平台下解决httpd.exe: syntax error on line 39
近来在研究PHP,结果为了Apache的安装伤神不已...小白我在安装后,启动Apache的服务虽然可以,不过,在Apache sevice monitor 中启动services时就会出现如下的问题 ...
- fatal: protocol error: bad line length character: This
昨晚尝试搭建一个Git服务器,在搭建好服务器后,在服务器创建了一个空项目,我在本地使用git clone 拉取项目时,报了fatal: protocol error: bad line length ...
- MySQL数据库导入错误:ERROR 1064 (42000) 和 ERROR at line xx: Unknown command '\Z'.
使用mysqldump命令导出数据: D:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump -hlocalhost -uroot -proo ...
- Java使用dom4j读取xml时报错:org.dom4j.DocumentException: Error on line 2 of document : Invalid byte 2 of 2-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 2-byte UTF-8 sequence
1.Java使用dom4j读取xml时报错: org.dom4j.DocumentException: Error on line 2 of document : Invalid byte 2 of ...
- Jmeter BeanShell 引用变量报错jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Parse error at line 14, column 181 : Error or number too big for integer
如果你通过CSV Data Set Config或者_StringFromFile函数来参数化你的请求,需要特别注意当参数为纯数字时,jmeter会默认将其识别成int型数据,说明jmeter并不是默 ...
随机推荐
- python学习笔记(16)--django的安装
说明: 1. 直接在cmd输入: pip install Django==1.10.6前提是安装了python,pip并添加了环境变量 2. http://www.lfd.uci.edu/~gohlk ...
- 等待事件 wait event
衡量数据库状况, 优化数据库等 当一个进程连接到数据库后, 进程所经历的种种等待就开始被记录, 并且通过一系列的性能视图进行展示, 通过等待事件用户可以很快发现数据库的性能瓶颈, 从而进行针对性能的优 ...
- Android Studion的Monitor中显示No Debuggable Application的解决方法
在使用Android Studion的时候,突然android Monitor中无法下拉显示调试项目,只是一直提示No Debuggable Application,然后上网搜索的解决办法: 第一种方 ...
- Java打印整数的二进制表示(代码与解析)
Java打印整数的二进制表示(代码与解析) int a=-99; for(int i=0;i<32;i++){ int t=(a & 0x80000000>>>i)&g ...
- msysgit使用方法
安装好后运行"Git Bash",出现命令框. 输入 ssh-keygen -t rsa -C “your_email@youremail.com” 会提示SSH Public K ...
- Geometric deep learning on graphs and manifolds using mixture model CNNs
Monti, Federico, et al. "Geometric deep learning on graphs and manifolds using mixture model CN ...
- 【转】MFC 无边框窗口的拖动
MFC中无边框窗口的拖动 void CXXXXDialog::OnLButtonDown(UINT nFlags, CPoint point) { PostMessage(WM_NCLBUTTONDO ...
- vlc player验证交换机igmp
使用vlc media player发送多播数据,验证交换机igmp的设置是否成功. 链接 http://peakdrive.com/?p=440 http://www.dasblinkenlicht ...
- mysql -- 模糊查询的四种方法
摘录自:http://www.jb51.net/article/48315.htm 1 %:表示任意0个或多个字符.可匹配任意类型和长度的字符,有些情况下若是中文,请使用两个百分号(%%)表示. 比如 ...
- 双卡手机怎么指定SIM卡打电话
双卡手机如何指定SIM卡打电话 package com.example.dualsimtest; import android.app.Activity; import android.content ...