Ok, so I have a functions.h header file (without the main function) and a main.c file. If I add both of them to a project and run it, I get multiple errors saying:
_function1 defined in module MAIN.C is duplicated in module FUNCTIONS.H
_function2 defined in module MAIN.C is duplicated in module FUNCTIONS.H
etc...
although I have defined them ONLY in functions.h file. The same error is produced for the array of records, that I've defined in functions.h. Any idea of what I'm doing wrong?
Here's a small example how it looks in general:
Code:
(functions.h)
int number (int low, int high);
struct rec {
char name[33];
};
struct rec arr[5]; // array of records
int number (int low, int high){
... some actions
}
(main.c)
#include "functions.h"
number(1,50)