Reputation: 71
I am quite new to the android-ndk. For this code
const char *inCStr = (*env)->GetStringUTFChars(env, str, NULL);
if (inCSt && inCSt[0] != '\0') {
char *outCStr = b64encode(inCStr);
return (*env)->NewStringUTF(env, outCStr);
}
I get the error
'inCSt' undeclared (first use in this function)
if (inCSt && inCSt[0] != '\0') {
What did I do wrong?
Upvotes: 2
Views: 516
Reputation: 40407
const char *inCStr = (*env)->GetStringUTFChars(env, str, NULL);
if (inCSt && inCSt[0] != '\0') {
You declared inCStr
but tried to use inCSt
without the r
Upvotes: 1