If you need to write the numeric values as human-readable text than you may use use
CString
and
CStdioFile
classes, for instance:
CStdioFile file_object(filepath,CFile::modeCreate|CFile::modeWrite);
CString sValue;
sValue.Format(_T("%f"), myfile.version_number);
file_object.WriteString(",");
file_object.WriteString(myfile.name);
file_object.WriteString(",");
sValue.Format(_T("%d"), myfile.n_tcp);
file_object.WriteString("\n");
...
:)