#include "RooFit.h" #includeusing namespace RooFit; int main() { TString str1 = "Hello"; TString str2 = "World"; str1.Append(str2); std::cout << str1 << std::endl; // Output: HelloWorld return 0; }
#include "RooFit.h" #includeIn both examples, the TString Append method is used to add a string (str2 in example 1 and str2 formatted as an integer in example 2) to the end of an existing string (str1). The package library for TString Append is the RooFit library, which is part of the ROOT data analysis framework.using namespace RooFit; int main() { TString str1 = "The answer is "; int num = 42; TString str2 = Form("%i", num); str1.Append(str2); std::cout << str1 << std::endl; // Output: The answer is 42 return 0; }