Wednesday 5 June 2019

c++ - How to concatenate a std::string and an int?

I thought this would be really simple but it's presenting some difficulties. If I have



std::string name = "John";
int age = 21;


How do I combine them to get a single string "John21"?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...