有人可以帮我解释这个宏吗? [英] Could anybody explain this macro for me?
本文介绍了有人可以帮我解释这个宏吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#define D(y ...)(const int []){y}
我的理解是D正在接受各种长度参数y
这是一个const int数组。我是对的吗?
谢谢。
#define D(y...) (const int []) {y}
My understand is that D is taking in a various length parameter y
which is an array of const int. Am I right?
Thanks.
推荐答案
11月13日,12:46 * pm," ; webinfin ... @ gmail.com" < webinfin ... @ gmail.com>
写道:
On Nov 13, 12:46*pm, "webinfin...@gmail.com" <webinfin...@gmail.com>
wrote:
#define D(y ...)(const int [ ]){y}
我的理解是D正在接受各种长度参数y
这是一个const int数组。我对吗?
#define D(y...) (const int []) {y}
My understand is that D is taking in a various length parameter y
which is an array of const int. Am I right?
这是语法错误。你确定你正确地转录了
吗?
This is a syntax error. Are you sure you transcribed
it correctly?
Old Wolf写道:
Old Wolf wrote:
11月13日下午12:46,webinfin ... @ gmail.com < webinfin ... @ gmail.com>
写道:
On Nov 13, 12:46 pm, "webinfin...@gmail.com" <webinfin...@gmail.com>
wrote:
> #define D(y ...)(const int []){y}
我的理解是D正在接受各种长度参数y
这是一个const int数组。我对吗?
>#define D(y...) (const int []) {y}
My understand is that D is taking in a various length parameter y
which is an array of const int. Am I right?
这是语法错误。你确定你正确地转录了
吗?
This is a syntax error. Are you sure you transcribed
it correctly?
对我而言,它看起来像是新C标准的可变宏,而不是C ++标准中的
。
To me it looks like a variadic macro from the newer C standard, not
yet in the C++ standard.
我们********* @ gmail.com 写道:
#define D(y ...)(const int []){y}
我的理解的是D是一个各种长度参数y
这是一个const int数组。我是对的吗?
#define D(y...) (const int []) {y}
My understand is that D is taking in a various length parameter y
which is an array of const int. Am I right?
尝试clc,这看起来像C99。
-
伊恩柯林斯
Try c.l.c, this looks like C99.
--
Ian Collins
这篇关于有人可以帮我解释这个宏吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文