V niektorých kód int8_t[]
typ sa používa namiesto char[]
.
int8_t title[256] = {'a', 'e', 'w', 's'};
std::string s(title); // compile error: no corresponding constructor
Ako správne a bezpečne vytvoriť std::string
z nej?
Keď budem robiť cout << s;
Chcem, aby to tlačiť aews
ako ak char[]
typ prešla na konštruktér.