Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to concatinate two strings in c++

#include <iostream>
#include <cstdlib>

std::string text = "hello";
std::string moretext = "there";
std::string together = text + moretext;
std::cout << together << std::endl;

>> hello there
Source by www.journaldev.com #
 
PREVIOUS NEXT
Tagged: #concatinate #strings
ADD COMMENT
Topic
Name
9+7 =