I'm assuming that you're asking this question to understand legacy C code.

As you are using C++, the equivelent code in your first example would be.


#include <iostream>
#include <string>
...