Global Variables, include files and classes
Hello, it seems i've run into some problems using an API that uses global variables. To make things easier to implement I encapsulated all the code I needed into a class and then in a different program I include the class defintion and make instances of it to interface with the API. Problem is that there is a global variable in the API that it forces me to use and it just doesn't seem to be working.
How would global variables work in this sense? In my program I include the class definitions at "ctk_RAPIDobj.H" and in the "ctk_RAPIDobj.H" file I include the API's header file "RAPID.H" where the global variable is declared "extern int RAPID_num_contacts."
Although everything compiles fine it seems that the global variable never changes. I know this has to do something with the setup I'm using because if I just make a program and include "RAPID.H" and run some functions the global variable changes as expected.
I know this kind of vague but if there is some glaring thing that pops out please let me know. Thank you in advance for your help.