I have a question to ask about transferring static variables between two files.
Now I have one Ac file and a second B.cpp file
In ac
static struct { int int } static_variable
Now Ac should call the func() function in B.cpp, and this function should change the static_variable in Ac
In B.cpp
func() { static_variable = ***; }
I understand that B.cpp cannot access the static variable in Ac, so if I really need to do this, what should I do?
source share