SyntaxFix
Write A Post
Hire A Developer
Questions
If you don't know the size of the string beforehand, you can dynamically allocate an array:
auto tab2 = std::make_unique<char[]>(temp.size() + 1); std::strcpy(tab2.get(), temp.c_str());