I want to user my c++ code in a android/opencv/ndk project. When I paste the files into the jni folder and open them, the compiler gives me invalid argument errors for functions like substr or fwrite.
An example:
#include <string>
#include <vector>
using namespace std;
using namespace cv;
...
std::string str="We think in generalities, but we live in details.";
std::string str2 = str.substr (12,12);
does the compiler quit for substr with:
Invalid arguments ' Candidates are: std::basic_string,std::allocator> substr(?, ?) '
I obviously doing something wrong! I'm using OpenCV 2.4.3.2 for Android and C/C++ Dev. Tools 8.1.1 for Eclipse.