How to use varible which is from different program?
Put these variables in a .cpp file by themselves.
Use extern in the other .cpp files
Then just add this .cpp with the variables to the build of any program.
Later, you can learn how to avoid this and use a library instead.