I know how to do this in other languages, but not C++, which I am forced to use here.
I have a Set of Strings that I\'m printing to out in a list, and they need a co
Another possible solution, which avoids an if
if
Char comma = '['; for (const auto& element : elements) { std::cout.put(comma) << element; comma = ','; } std::cout.put(']');
Depends what you're doing in your loop.