How about posting code that compiles? Yours gave:
sketch_nov09f:6: error: ISO C++ forbids declaration of 'setup' with no type
sketch_nov09f.cpp: In function 'int setup()':
sketch_nov09f:6: error: new declaration 'int setup()'
/Applications/Arduino_1.0.1.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:117: error: ambiguates old declaration 'void setup()'
sketch_nov09f.cpp: At global scope:
sketch_nov09f:11: error: ISO C++ forbids declaration of 'loop' with no type
sketch_nov09f.cpp: In function 'int loop()':
sketch_nov09f:11: error: new declaration 'int loop()'
/Applications/Arduino_1.0.1.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:118: error: ambiguates old declaration 'void loop()'
sketch_nov09f:13: error: invalid conversion from 'int (*)(uint8_t)' to 'int'
sketch_nov09f:13: error: expected `;' before 'positions_check'
You can't leave "void" off the front of setup and loop.
... since i've managed to compile the code, ...
How, exactly?