diff --git a/cstr_util.h b/cstr_util.h index f7ce853..a5d080b 100644 --- a/cstr_util.h +++ b/cstr_util.h @@ -3,6 +3,7 @@ #ifdef __cplusplus extern "C" { #endif +#include /** * @brief Copy string to another string * @param dest The pointer of output string diff --git a/encoding.cpp b/encoding.cpp index 2207346..a461b2b 100644 --- a/encoding.cpp +++ b/encoding.cpp @@ -30,7 +30,7 @@ bool encoding::iconv_convert(std::string input, std::string& output, std::string size_t buf_left = 0; std::string out; size_t avail_in = input.length(); - auto in = input.c_str(); + char* in = (char*)input.c_str(); if (!buf) { iconv_close(cd); return false;