Discussion:
changing parameters of the given code.
(too old to reply)
xewang
2011-06-13 00:35:08 UTC
Permalink
It says that we can't do that, but are we allow to do something like this:

void Don'tChangeFoo (int A)

{
int B = ...;
ChangedFoo (int A , int B)
}

void ChangedFoo ( int A, int B)
{ ... }
Ashif Harji
2011-06-13 01:03:57 UTC
Permalink
Calling another routine is okay. However, you need to be careful because
the routines specified in the assignment need to be implemented as
recursive routines. Hence, if Don'tChangeFoo is recursive then
Don'tChangeFoo must be implmented to call itself appropriately. It may
also call other routines.

ashif
Post by xewang
void Don'tChangeFoo (int A)
{
int B = ...;
ChangedFoo (int A , int B)
}
void ChangedFoo ( int A, int B)
{ ... }
Continue reading on narkive:
Loading...