일부에서 코드 int8_t[]
형식을 사용하는 대신 char[]
.
int8_t title[256] = {'a', 'e', 'w', 's'};
std::string s(title); // compile error: no corresponding constructor
어떻게 안전하고 올바르게 만들기 std::string
에서 그것은?
때 나는 할 것입니다 cout << s;
내가 원하는 인쇄 aews
우 char[]
입력 전달되었습니다.