- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
下面的代码可以正常工作
#define open {
#define close }
#include<stdio.h>
#define int char
main()
open
int a ;
printf("This is testing code" );
close
但是如果我换行
#include<stdio.h>
#define int char
作为
#define int char
#include<stdio.h>
它会抛出很多这样的错误
In file included from /usr/include/stdio.h:36,
from print.c:19:
/usr/include/bits/types.h:35: error: both 'short' and 'char' in declaration specifiers
/usr/include/bits/types.h:37: error: both 'long' and 'char' in declaration specifiers
/usr/include/bits/types.h:42: error: both 'short' and 'char' in declaration specifiers
/usr/include/bits/types.h:43: error: both 'short' and 'char' in declaration specifiers
.................................................
so and so
实际上 stdio.h 中发生了什么?
最佳答案
定义了short int
、long int
等类型的变量,通过define改成short char
显然失败了> 和 long char
。
重新定义基本的 C 类型通常不是一个好主意。
关于宏观困惑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2408855/
我需要 #define 方面的帮助来执行以下操作: for (int i = 0; i label1.text = (东西) 当 i == 2--> label2.text = (东西)
我正在尝试从 proc macro workshop 中实现构建器模式我正在创建一个 proc 宏,它解析一个结构,提取它的 name、field_names 和 field_types。它应该重现结
给定: fn main() { println!("{0} {0:?}", 10); } 我得到: main.rs:2:27: 2:29 error: argument redeclared
我想使用带有 String 作为第一个参数的 format! 宏,但是因为宏需要一个字符串文字,所以我无法向它传递任何不同的东西. 我想这样做是为了将字符串动态添加到当前字符串中,以便在 View 引
我正在寻找一种方法来链接 Rust 中 try! 宏的使用,并找到了 this pull request that implements the ? operator . 它好像已经被合并了,但我似乎
我正在使用 Rust 稳定版 1.30 和 Relm。我想出了如何设置默认窗口大小,但不知道如何设置图标,至少在 View 中是这样!宏。 这是我的main.rs extern crate gtk;
我希望通过 format! 宏格式化右对齐 float ,并且符号始终可见。使用 syntax specification我设计了以下格式: format!("{:>10+.1}", 23.3434)
我是一名优秀的程序员,十分优秀!