PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Pointer Notation
Date: Sunday, 09 Feb 2020, 15:52:00


    > Message Posted By: Unknown
    >
    > The spec for homework 2 states that we cannot use pointer notation other
    > than for the declaration of arguments to main(). Are we allowed to use
    > pointer notation for declaration of arguments to functions we create?

No.  Instead you can use [] notation as in

  void zap (int x[], int n) {
     for (int i = 0; i < n; i++)\
	x[i] = 0;
  }

--Stan-
PREV INDEX NEXT