error: implicit instantiation of undefined template 'std::codecvt<unsigned char, char, mbstate_t>'

帅天 谭 6 Reputation points
2022-08-25T12:12:31.72+00:00

I want to define a byte stream with C++。Therefore I used basic_ifstream<unsigned char> as the container。
It works good in Visual Studio
234836-image.png
'byte' means 'unsigned char'

However, when I migrate the code to Android Studio, it outputs the following error:
error: implicit instantiation of undefined template 'std::codecvt<unsigned char, char, mbstate_t>'
234907-image.png

Offcourse I can use ifstream instead of basic_stream<unsigned char>, but I really want to know how to resolve the error above.
Can anyone help me? Thank you very much!

Developer technologies | C++
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.