构造函数等价 [英] Constructor equivalent

查看:66
本文介绍了构造函数等价的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述






因为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:

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案



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:
展开 | 选择 | Wrap | 行号


有什么更好的想法吗?



除了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆