Txt file with DOS codepage

// I'm using
CString text;
CString file_name;
text = "My text.";
file_name = "MyFile.txt";
FILE *fp;
fp = fopen(file_name, "w+");
fprintf(fp, text + "\n");
fclose(fp);
// There will be MyFile.txt in Windows codepage.

How to write to txt file with DOS codepage?
Last edited on
CharToOem
Topic archived. No new replies allowed.