The C++ code won't compile as it does not know what FILE is. Now I know C++ supports a newer file handling format with "myfile <<" etc. But I understood it stills supports the old fprintf format too.
So 2 questions:
1. If I still use the old fprintf format, how can I get the C++ to compile with the FILE* variable?
2. If I use the newer format how do I convert FILE* into ofstream ?
Have you included the header <cstdio>? Note that the C++ version of the headers put the names in the std namespace so you might have to write std::FILE, std::fopen, etc.