In un po ' di codice int8_t[]
il tipo è utilizzato invece di char[]
.
int8_t title[256] = {'a', 'e', 'w', 's'};
std::string s(title); // compile error: no corresponding constructor
Come correttamente e in modo sicuro creare un std::string
da esso?
Quando farò cout << s;
Voglio che si stampa aews
come se char[]
il tipo è stato passato al costruttore.