#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并不是默 ...
随机推荐
- 队列——PowerShell版
继续读啊哈磊<啊哈!算法>感悟系列——队列 地铁售票处排队,先来的人先到队首先买完先走,后来的人排在队尾等候后买完后走. 想买票,必须排在队尾:买完票,只能从队首离开. 这种先进先出(Fi ...
- R 画structure图
id percent k1_B04_WL-1.fs_1 0.021 k31_B04_WL-1.fs_1 0.624 k21_B04_WL-1.fs_1 0.355 k1 K=3 数据输 ...
- activemq5.11整合spring4.2.3
前言 这篇博客记录 activemq5.11整合spring4.2.3的过程,免得以后忘记了 1.工程结构 2.pom.xml <project xmlns="http://maven ...
- 为gridview的每个单元格添加鼠标悬停提示文本(tooltip)
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { for (int i ...
- Nginx动静分离知识及配置
Nginx动静分离知识及配置,本质上与分离上传下载功能是相同功能,本质就是在文件服务器也是需要部署WEB应用的,只是在进行代理分离的时候分配到对应的文件服务器上去. 随着Nginx高性能Web服务器大 ...
- [Django学习]模型
ORM简介 MVC框架中包括一个重要的部分,就是ORM,它实现了数据模型与数据库的解耦,即数据模型的设计不需要依赖于特定的数据库,通过简单的配置就可以轻松更换数据库 ORM是“对象-关系-映射”的简称 ...
- jquery动态分页
最近一直研究jquery的分页效果,刚刚弄好了一个,拿出来与大家分享.分页效果与时光网的差不多. 网址:http://www.mtime.com/movie/news/all/ 先在aspx页面放置一 ...
- C++ c++与C语言的区别(struct类型的加强,函数-变量类型加强,bool类型)
//区别④:struct类型的加强(C++版本) #include<iostream> using namespace std; //C++中的struct是一个新类型的定义声明 //c+ ...
- 一个极其高效的虚拟机内存冗余消除机制:UKSM
Linux内核机制KSM(Kernel Samepage Merging)能合并KVM虚拟机之间相同内存的页面,被CentOS, RHEL之类的服务器内核广泛采用,但是其速度很慢.UKSM(Ultra ...
- ajax传值给php
test.php <script type="text/javascript"> function selectInput(oSelect) { var value= ...