A few more words about this question

jabber (jabber)
本文发表在 rolia.net/zh 相约加拿大网上社区枫下论坛
There are two kinds of functions in C++: global ones and those in the class( let's forget about struct).

I don't know the answer for the global functions. But for (non-static) class functions, I think the answer is "this" pointer. Just remind how the C++ compiler works: The programmer do not put "this" as an argument, but
the C++ compiler will include it as it "decorates" the function signature.
I also don't know the answer for the static function in a class.

Well, I know some friends consider the following cases:

1) void f() {}
This fuction does not contain an explicit argument. But it is equivalent to having "void" as an argument.

2) void f(int a=0; double d=0.0){}
Here a=0 and d=0.0 are default value. It seems I have not yet heard there are named "implicit argument".

I have checked some C++ books's index and I failed finding entries about "implicit arguments". I also consulted with two C++ gurus among my friends and they said they have no good ideas.

If anybody know the complete answer, please tell us and give us some

Thanks a lot.
更多精彩文章及讨论,请光临枫下论坛. 网址: rolia.net/zh
2001-4-7 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 请教C++中“implicit argument”是什么意思?

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT杂谈