I have two cpp files.I m updating a value of an integer in one cpp file and i want to perform a specific function in the second file as per to the value updated in the first file.
I m initialing the variable in the constructor.
I have two buttons in the first cpp file. On clicking the first button I m updating the variable as 1 and on pressing button two , I m updating the variable as 2.
I m retrieving this variable in the second cpp file with respect to the object created for the class in the first cpp file.

The problem is that i m not able tot retrieve the updated value in the second file. only the initialized value is being retrieved. neither 1 nor 2 is updated.

Thankx a ton in advance.. !!

Regards ,