C函数重载? [英] C function overloading?

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

问题描述

我想重载一个C函数。有没有简单的方法可以做到这一点?

解决方案

2004年5月31日星期一09:48:23 +0900,

JaSeong Ju< j _ ****** @ yahoo.com>写道:



我想重载一个C函数。有没有简单的方法呢?




No.


Martien

-

|

Martien Verbruggen |从头开始,继续直到你

|走到尽头;然后停下来。

|


JaSeong Ju< j _ ****** @ yahoo.com>写道:

我想重载一个C函数。有没有简单的方法呢?




C号不支持函数重载。

-

当我不得不依靠不足时,我更喜欢它是我自己的。

- 理查德希思菲尔德


" ; Ben Pfaff < bl*@cs.stanford.edu>在消息中写道

news:87 ************ @ blp.benpfaff.org ...

JaSeong Ju< j _ ** ****@yahoo.com>写道:

我想重载一个C函数。有没有简单的方法


这个?
C号不支持函数重载。
-
当我不得不依靠不足时,我更喜欢它是我自己的。




然而,您可以编写一个调用普通C

函数的包装函数,但增加了新的功能。很多人这样做是为了调用内存

函数,例如。


-

Mabden


I would like to overload a C function. Is there any easy way to do this?

解决方案

On Mon, 31 May 2004 09:48:23 +0900,
JaSeong Ju <j_******@yahoo.com> wrote:



I would like to overload a C function. Is there any easy way to do this?



No.

Martien
--
|
Martien Verbruggen | Begin at the beginning and go on till you
| come to the end; then stop.
|


JaSeong Ju <j_******@yahoo.com> writes:

I would like to overload a C function. Is there any easy way to do this?



No. C does not support function overloading.
--
"When I have to rely on inadequacy, I prefer it to be my own."
--Richard Heathfield


"Ben Pfaff" <bl*@cs.stanford.edu> wrote in message
news:87************@blp.benpfaff.org...

JaSeong Ju <j_******@yahoo.com> writes:

I would like to overload a C function. Is there any easy way to do

this?
No. C does not support function overloading.
--
"When I have to rely on inadequacy, I prefer it to be my own."



You could, however, write a wrapper function that calls the normal C
function, but adds new functionality. Many people do this in calling memory
functions, for instance.

--
Mabden


这篇关于C函数重载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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