#include #include using namespace std; string cpp_gethostname(){ char hostname_buffer[100]; gethostname(hostname_buffer, 100); return string(hostname_buffer); } int main(){ string s1, s2; s1 = "Zebra"; s2 = "Moose"; string s3 = s1 + s2; cout << "s3 = " << s3 << endl; cout << "Length of s3 is: " << s3.length() << endl; s3 += "Racoon"; cout << "s3 = " << s3 << endl; sethostname(s3.c_str(), s3.length()); cout << "We're on: " << cpp_gethostname() << endl; return 0; }