I have Added a new item to a FormProject in VC++ .NET.
This is an includerFile (OneFile.h)
On Form3 I have #include "OneFile.h" and in OneFile.h I have only written this:
(Nothing else is written in OneFile.h)
#define Macro1 Time == Value
This macro works fine using it in OneFile.h
My problem here now is if I also want to declare an int like this in OneFile.h:
int Number100 = 0;
I will have a compiler Error that says:
Form3.obj : error LNK2005: "int Number100" (?Number100@@$$Q3HA) already defined in Form1.obj
C:\Documents and Settings\Jennifer\My Documents\Visual Studio 2008\Projects\Form1\Debug\Form1.exe : fatal error LNK1169: one or more multiply defined symbols found
Why is this happening. It doesn´t matter what I will name the int. The compiler says that this "already is defined in Form1.obj" but this is not true as I can change it to whatever and still have this compile Error ?