C++ doubts in global variables and numerical integration

See the old “Boundary integral” and " Non-rectangular region integration" threads.