i want to know how to store a variable in my plugin that all c++ files in my plugin can access

i want to know how to store a variable in my plugin that all c++ files in my plugin can access

use extern int variable = 0 in the main plugin header file to create a global variable accessible by all plugin classes