How to declare/use extern map in c++-Collection of common programming errors

I’m not very used and don’t really understand the use of global variables in c++, and cannot manage to solve a problem here, although I’m nearly sure I’m using the declarations the right way. I’ve got an unordered map, which contains params from a file. This is working fine, I’ve outputted the contents, everything ok. But I would like this map to be available everywhere in my program, so that I don’t have to pass it as an argument every time, hence the use of global variable. I’ve a little typedef :

typedef tr1::unordered_map unmap;

then the function to read the parameters:

unmap readParameters(string filename);

then the global scope declaration (everything outside the main of course, although in the same file, I still don’t have any headers):

extern unmap params;

The affectation is made in the main() function:

unmap params=readParameters(inputfile_name);

(Note: I tried with and without the “unmap”, but same error). And I’ve got a function displayInformation() to display its contents in which I use my map “params”:

for (unmap::iterator it=params.begin();it!=params.end();it++){
    cout