SyntaxFix
Write A Post
Hire A Developer
Questions
This solution will work regardless of the number of char variables you have:
char
char c1 = 'z'; char c2 = 'w'; std::string s1{c1}; std::string s12{c1, c2};