Re: [OT] quick question about function declarations in C++
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/26/08 22:16, H.S. 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?
What happens if you create a small test program and try it out?
- --
Ron Johnson, Jr.
Jefferson LA USA
"Kittens give Morbo gas. In lighter news, the city of New New
York is doomed."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkhkXj0ACgkQS9HxQb37Xmc6nACgusCQujikOpdK5iPS2IECWz9q
IgYAoJcPPko8e22O6Um4AcStaK8PuTGY
=LozV
-----END PGP SIGNATURE-----
Reply to: