c++ - std::array<char, N> to std::string -
what best way convert std::array<char, n> std::string?
i have tried producing template method have had no luck. think c++ skills aren't scratch. there idiomatic way of doing in c++?
i won't "best way", a way use std::string's iterator constructor:
std::array<char, 10> arr; ... // fill in arr std::string str(std::begin(arr), std::end(arr));
Comments
Post a Comment