(So continues the JNI saga....)
I currently have this (in C++, this being my native code in C++):
(x is a jstring passed thru the header)
jdouble res;
if (x=="*")
{
res=a*b;
}
else if (x=="+")
{
res=a+b;
}
else if (x=="-")
{
res=a-b;
}
else if (x=="/")
{
res=a/b;
}
else
{
res=-9999;
}
return res;
but it says that jstring (x) and const char * (the things after the "==" for example the "*") are not compatible: "Error: operand types are incompatible ("jstring" and "const char *")"