I have a vector<int>
container that has integers (e.g. {1,2,3,4}) and I would like to convert to a string of the form
"1,2,3,4"
What is the cleanest way to do that in C++?
In Python this is how I would do it:
>>> array = [1,2,3,4]
>>> ",".join(map(str,array))
'1,2,3,4'
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…