A few more words about this question

jabber (jabber)
<本文发表于: 相约加拿大:枫下论坛 www.rolia.net/f >
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.
<本文发表于: 相约加拿大:枫下论坛 www.rolia.net/f >

2001-4-7 -04:00

回到话题: 请教C++中“implicit argument”是什么意思?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT杂谈