Hi I would like to declare a variable in a data.h and be able to use in other modules.c
--------------------------------------------
data.h
#ifndef _DATA_H_
#define _DATA_H_
int foo = 10;
#endif
--------------------------------------------
#include "data.h"
extern int foo;
void main
{
foo = 12;
test();
}
-------------------------------------------
#include "data.h"
extern int foo;
test()
{
foo = 1+ foo;
}
------------------------------------------
my compiler complains multiple defintions
What i'm I doing wrong
thanks cool