Note 7.2.1.
In order to compile this code, you will have to include the header file for the
string
class. If you are already including iostream
, you may get away with not explicitly including string
. In some environments, iostream
will include string
for you. But it is best to explicitly include string
if your code relies on it.