I have a vector of ints that i want to put into a jintArray. How do I do this?
When I tried the below code, it didn't work but instead when i printed out the int values on the java side, they were all messed up.
jintArray arr = env->NewintArray( intVector.size() );
env->SetintArrayRegion( arr, 0, intVector.size(), ( jint * ) &( intVector ) );
This returns weird values. What am I doing wrong?