c++ - How to declare a global variable that could be used in the entire ...
The below solution should be simple enough as per the title "How to declare a global variable that could be used in the entire program " . If you want to use it in a different file then make use of extern keyword.