How can i concatinate in c++ to give a sentence | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

How can i concatinate in c++ to give a sentence

21st Apr 2018, 4:27 PM
Ayobami
2 Antworten
+ 16
std::string name = "dt"; int age = 20; std::string res; res = name + std::to_string(age);
21st Apr 2018, 4:35 PM
🌛DT🌜
🌛DT🌜 - avatar
+ 2
Just add the 2 strings with +.
21st Apr 2018, 5:31 PM
Timon Paßlick