Adding a new Source File and using a function call

To get around the issues i explained in another post, where i tried to use

include “”, I instead created the new file and defined a new function as follows:

#include “vex.h”
void function ( ) {
while (Controller1.ButtonB.pressing()){;
wait(2300, msec);
wait(2300, msec);
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.

The code is expecting int function() to be declared as an integer and not a function.

In main.cpp it should be void function(); since the function as written in the other file is a void

thanks, that fixed it