Department of Engineering

IT Services

C++ Strings

C++ offers an alternative, often easier, way of dealing with character strings. The following prints out Hello World

#include <string>
...
string s="Hello";
string t=" World";
cout << s+t << endl;