6

How to concatenate a std::string and an int?

The C++11 solution, which is probably the preferred right now, is to use std::to_string. There's at least 6 answers saying this exact same thing, spread out over a few years.

It was quite the read working my way through all of them to figure out if any had something new!

Can we... delete the redundant ones? Do some other thing?

3
  • Typically, you'd choose the best one and vote to close the other ones as duplicates of that question. Once a question has answers, it can't easily be deleted. The next step, if there are multiple questions that are exactly the same, is to flag it for a moderator to merge the questions. Jan 4, 2017 at 0:58
  • 2
    @BrendanAbel the answers themselves are all on one question.
    – djechlin
    Jan 4, 2017 at 1:03
  • Sorry, I thought you were talking about duplicated questions, not answers Jan 4, 2017 at 1:04

0

You must log in to answer this question.

Browse other questions tagged .