Java and C++ communication
i have a C++ code and java code. C++ code writes records to java program and java should process those records and send the resultant records to c++ code. I have implemented a native methods in c++ to getrecord and outputresult. And one more thing is that java program is called from c++ program using System command
Now what i am facing is when ever java tries to read a record from c++ code a new instance of c++ code is creating and the values that are already written in c++ code are not coming.
finally my question is when a C++ function is called from java how to return global variables in C++ program.