To get around the issues i explained in another post, where i tried to use
include “file.name”, I instead created the new file and defined a new function as follows:
#include “vex.h”
void function ( ) {
while (Controller1.ButtonB.pressing()){;
Drivetrain.turn(right);
wait(2300, msec);
Drivetrain.turn(left);
wait(2300, msec);
Drivetrain.stop();
wait (20, msec);
}
}
// then in the main.cpp file i added the following lines:
int function ();
function ();
This process seems to work fine, but with a warning on the int function (); line "Empty parenthesis interpreted as a function declaration (fix available). " Any ideas on how to get rid of the warning, since the code works and i don’t want to get multiple warnings as i add more additional source files.