Log in or register to post comments

how can i convert jstring to int in videoplayback cpp file

April 22, 2013 - 9:41pm #1

hi all i want to convert jstring to int in cpp file of videoplayback sample.I got the name of iamge targets as number like 1, 2, and so on.now i got the image name in jstring which value is 1 for suppose.

jstring str=env->NewStringUTF(imageTarget.getName()); /// this value will be 1

now i want to set this value to     int currentTarget  inside the render frame method. 

how can i convert jstring to int in videoplayback cpp file

April 23, 2013 - 5:28am #4

Great! you're welcome.

how can i convert jstring to int in videoplayback cpp file

April 23, 2013 - 5:28am #3

Thanks It worked for me. :)

how can i convert jstring to int in videoplayback cpp file

April 22, 2013 - 10:34pm #2

Hi, have you tried with "atoi" function ?

int i = atoi( imageTarget.getName() );

(and probably you need to include <stdlib.h> )

Log in or register to post comments