20.1,20.1

0 views
Skip to first unread message

A.J. Robinson

unread,
Dec 4, 2011, 12:29:14 PM12/4/11
to byu-cs-jm-142-Fall-2011
In all of your examples in class, you included an int that indicated
how many units were in the array, yet in the questtions for 1 and 2 it
only says to feed it an array of posns, a dx, and a dy. Does this
mean we will not recieve credit if we include a "howManyThereAre" into
the function?

Jay McCarthy

unread,
Dec 4, 2011, 1:23:27 PM12/4/11
to byu-cs-jm-1...@googlegroups.com
No, the only way to make a function that takes an array work is to also include the length. Either by combining them in a compound or with two arguments. That's an 'array' as far as I'm concerned.
--
Jay McCarthy <j...@cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

A.J. Robinson

unread,
Dec 4, 2011, 1:36:22 PM12/4/11
to byu-cs-jm-1...@googlegroups.com

Thanks!

Reply all
Reply to author
Forward
0 new messages