Log in

View Full Version : Arrays in RobotC


The Zevling
27-10-2010, 18:47
I'm working in robotC for our VEX robots, and I cannot figure out how to pass an array into a function.

When I try to declare the function as:
int Foo(int array[]);
I get several errors that sum up to mean that the code doesn't like square brackets inside function declarations.

Is there a way to pass arrays into functions, or will I have to find an alternate solution?

RoboDesigners
27-10-2010, 21:49
You might want to look at this thread (http://www.robotc.net/forums/viewtopic.php?f=11&t=1365) on the RobotC forums. It seems that you can't pass arrays to functions, but that might have changed...