how to make a global variable that can be used eveyrwhere C++ code example Example: cpp global variable int g_x; // global variable g_x