本文介绍了有人可以帮我解释这个宏吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#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" < webinfin ... @ gmail> 写道: On Nov 13, 12:46*pm, "webinfin...@gmail" <webinfin...@gmail> 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 < webinfin ... @ gmail> 写道: On Nov 13, 12:46 pm, "webinfin...@gmail" <webinfin...@gmail> 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 ywhich 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 写道: #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
更多推荐
有人可以帮我解释这个宏吗?
发布评论