C++ 2 string variable concatenation

In this article, we show an example of combining 2 string variables.

In this article, we show an example of combining 2 string variables.

#include <iostream>
#include <string>

int main() {
    std::string firstString = "prs";
    std::string secondString = "def";
    std::string result;
    result = firstString + secondString;
    std::cout << result << std::endl;
    return 0;
}
Last modified 17.01.2025: new translations (f32b526)