In C, f doesn't take "no arguments", but rather "any arguments"*. Say int f(void) to declare "no arguments".
This is different from C++. Notably, C has separate notions of function "declaration" and function "prototype":
int f(); /* declaration -- f is still a mystery */
int f(int, double); /* prototype -- now we know how to call f */
int f(int n, double c) { return -1; } /* defintion -- now we can link */
*) As I said in the comment, "any arguments" is restricted to types that do not suffer default-promotion (in the same way as default-promotion happens to variadic arguments). That is, float, all flavours of char and of short int, and also ..., are not permissible in the actual function signature.
f, then you could consider writing in C++ instead of C". But just taking your existing C code and trying to compile it as C++ has a number of problems - the rest of your code could fail to compile as C++, or fail to do the same thing in C++ as it did in C, for a host of other reasons, many of which are not bugs in the C code at all.