Since matching the code to the errors seems to be a major issue for you, tell us, of all the files in your program which ones create a variable called g_vAliveHosts. CMessanger.cpp is one, but there is more than one. Armed with that knowledge, how do you think your program could get multiple instances of that variable when all the compiled source files are put together?