For std::ofstream you #include <fstream>.
For std::string you #include <string>.
<stdio.h> is a C header needed for functions such as printf or fopen. It's included like this: #include <stdio.h>. In C++ it's better to #include <cstdio> instead, so all names are embedded in namespace std (so you should use std::printf etc).
0
99ProblemsAndTheyreAllCode
On
You're a C programmer huh?
<stdio.h> is C's I/O library. I think you're looking for this (C++'s I/O library):
For
std::ofstreamyou#include <fstream>.For
std::stringyou#include <string>.<stdio.h>is a C header needed for functions such asprintforfopen. It's included like this:#include <stdio.h>. In C++ it's better to#include <cstdio>instead, so all names are embedded innamespace std(so you should usestd::printfetc).