In my code there is a loop that adds sth like that \"number,\" to stringstream. When it ends, I need to extract \',\' add \'}\' and add \'{\' if the loop is to repeated.
Why not just check the counter? And not insert the ','
douCoh << '{'; for(unsigned int i=0;i