Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
JNIアプリケーションを作成しています。私のC++コードには、があり std::stringます。jchar *Java関数に渡すには、そこからを取得する必要があります。どうすればよいですか?
std::string
jchar *
を使用env->NewStringUTF()して、 から新しい Java 文字列を作成しますchar*。
env->NewStringUTF()
char*