Standard headers can include other headers so this is probably the case here. If you want to make sure it works on all compilers you have to include <string>.
GNU's implementation, in particular, does include string in iostream but I believe the correct thing to do for portability is to include both explicitly.
The same code won't compile on VC++. Especially with the standard headers, you generally want to explicitly include individual headers to maintain flexibility.