header files & multiple declarations

hi

I've already put an "#ifndef" guard in my header file yet it still tells me that my declared objects(which I need globally) "are declared already".

Do I need to stick them in a .cpp file and if so, how can I access them? Would it work if I did?
When I declare my objects in a .cpp file it tells me that I can't access them anywhere else. I'm really in a dilema over this. I need my objects to be global across multiple .cpp files yet I dont want the "are declared already" message.
Declare them as extern in some header file that is included by everyone that needs them, then make them not extern in one of your .cpp files.
what does "extern" do? Would it help me or what can instead?
Extern basically tells the compiler "This variable exists somewhere else." It's basically the same as a function prototype, but for variable definitions.
thanks, extern did the trick. Today is the first time I've learnt and appreciated its meaning
Topic archived. No new replies allowed.