Well, i'm a newbie to C++ from Python and not familiar with declaring variable in header file. I am trying to create several .cpp file in which calculate some values from some the same constant value set. My code something like:
/Global_input.h/
extern int y = 1;
extern int x = 2;
/Properties_1.cpp/
//I wanna calculate z = x + y
include<Global_input.h>
int z;
/Properties_2.cpp/
//I wanna calculate g = x*y
include<Global_input.h>
int g;
I got stuck here, the way I search is create a new class or another .cpp file. Can I directly call x,y for such simple cases. Thanks in advance