UWP C++: Writing only instead of reading to a global variable?
问题 I have a separate header file for where I declare global variables. I have included that header file in pch.h which is included in every .cpp file. #include "variable.h" I now need to call the variable and read it in an if statment to start some code. Before compilation, no errors are shown in Visual Studio. However, when I compile the code, it returns error: Error LNK2005 "bool ahschecked" (?ahschecked@@3_NA) already defined in checkin.xaml.obj pch.h The variable is "ahschecked" which is