New course! Every coder should learn Generative AI!
Try a free lesson0
How can i concatinate in c++ to give a sentence
2 Answers
+ 16
std::string name = "dt";
int age = 20;
std::string res;
res = name + std::to_string(age);
+ 2
Just add the 2 strings with +.