[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] quick question about function declarations in C++



Not need to match, I think. :)

On Fri, Jun 27, 2008 at 11:16 AM, H.S. <hs.samix@gmail.com> wrote:
Hello,

I don't seem to recall at the moment so I thought of trying you all guys. In C++, do the names of arguments in a function declaration (or prototype) need to match the names of the arguments in function definition?

For example, consider a function declaration:

void foo(int i);

And then its definition:
void foo(int j)
{
... do something ...;
return;
}


It doesn't matter that I have used 'i' in the declaration and 'j' in the definition, does it?

Thanks,
->HS


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org




--
-------------------------------------------------
Buddha Debian GNU/Linux UEFI/BIOS
Homepage: http://starliu.9966.org
-------------------------------------------------
Reply to: