构造函数等价 [英] Constructor equivalent
问题描述
因为C不支持结构的construcor函数,
通常的写入方法是什么C中的这个C ++代码:
Hi,
since C does not support construcor functions for structs, what is the
usual approach to write this C++ code in C:
推荐答案
Gernot Frisch写道:
Gernot Frisch wrote:
由于C不支持结构的construcor函数,在C语言中编写这个C ++代码的常用方法是什么:
Hi,
since C does not support construcor functions for structs, what is the
usual approach to write this C++ code in C:
有什么更好的想法吗?
除了C语言明显缺乏经验之外,你似乎还可以。
Yours seems to be OK, apart from apparent inexperience in C.
我只是对这件事情进行了讽刺,所以你可以得到我的观点。感谢
你清算。
I just woosh-woosh-typed that thing so you could get my point. Thank
you for the clearing, though.
Gernot Frisch写道:
Gernot Frisch wrote:
任何更好的想法?
除了C语言明显缺乏经验之外,你似乎还可以。
Yours seems to be OK, apart from apparent inexperience in C.
我只是对那种东西进行了嘲讽,所以你可以得到我的观点。感谢
你的清算。
I just woosh-woosh-typed that thing so you could get my point. Thank
you for the clearing, though.
我猜到了,因此明显。如果你试图以尽可能正确的代码发布(即没有愚蠢的woosh-woosh
错误;-)),它可以节省每个人的时间。你可能知道,在c.l.c中即使是最小的
也会得到纠正(好事)。
I guessed as much, hence "apparent". It saves everybody''s time if you
try to post as correct code as possible (i.e. no silly woosh-woosh
errors ;-) ). As you probably know, in c.l.c even the smallest of
things get corrected (a Good Thing).
这篇关于构造函数等价的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!