Hi.
I have a class method that returns a map<string, KResult>, where KResult is a simple class with a few member variables.
On the C++ side, I print to screen the values stored in my map to make sure they are there.
map<string, KResult> MyClass::myMethod()
{
map<string, KResult> myRes;
... do some stuff....
cout << filling results << endl;
map["amp"] = KResult("amp", someValue, "ADU");
....
cout << returning result << endl;
//loop over map and print results to cout
return myRes
}
When I run this in python, I see the values stored in myRes when I print them to string, but the map is empty in python
kamper = MyClass()
myreturn = kamper.myMethod()
print myreturn
print myreturn.__dict__
the code prints to screen:
from c++
from python…
Why is the data not copied over into ‘myresults’ in python? Any ideas?
thanks in advance,
Adam