Compiling this on my mind gives me the following errors:
MakeData.h (included in MakeData.cpp): Data is not defined. Include DataStrcture.h (sic) on MakeData.h. DataStrcture.h (included in Main.cpp): this file is not include-guarded, so you'll have trouble when you include both DataStrcture.h and MakeData.h. I say include-guard everything and don't care about it.
should work. Always take care to declare everything before it is used and never declare the same name twice. Header files are no secret: you just have to keep in mind how they work, which is literally replacing the "#include <whatever>" with the contents of the file "whatever".
Wait, what are you trying to do? Macro redefinition errors (should) only occur when you #define a macro twice *in code*. Including the same file should not change the macro.
That is "ok". You should put include guards on mymacro.h to avoid redefining the macro when you include both mymacro.h and some_other_file.h on test.c, but this is technically not an error. An error would be adding "#define mymacro() !42" somewhere (note: "#define mymacro() 42" is fine, check the link above). That issues the warning:
/tmp/some_other_file.h:2:0: warning: "mymacro" redefined [enabled by default]
/tmp/mymacro.h:1:0: note: this is the location of the previous definition
I'm getting macro redefinition warnings, like 300 of them. Huge pain in my ass every time I recompile. I could probably fix it if my ide told me where the first and second definitions were, but it only tells me "warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition". Double clicking the warning takes me to the location in the file where this definition appears, and searching through the file tells me that it is only defined here once. It is header guarded, and every single header file I use is header guarded with #pragma once and #ifndef guards. Every time I include this header in another place, I get like 75 more redefinition warnings. My ide is vs2012. So apparently header guards aren't stopping it, or the gods are frowning at my lack of belief in them.
My first warning is "warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition"
my 33'rd warning is "warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition"
and one for every time it's included, all from the size file, on the same line.
Oh, OK, so the macro isn't yours? That may be a problem with the library you're using. A quick google search says it's a conflict between winerror and d3dx: