No, leave the extern declaration in the .h file. #include the .h in both .cpp files. The problem is that you're defining the variables as local in the .cpp files. Make them globals.
No, leave the extern declaration in the .h file. #include the .h in both .cpp files. The problem is that you're defining the variables as local in the .cpp files. Make them globals.