Can somebody give me some simple, basic example code that would write the first 5000 Unicode characters to a file? I'm using MingW (GNU GCC) and I absolutely refuse to learn Windows programming (not going to explain why), so it's gotta work with GCC.
I tried this, and I think it's just writing ASCII:
Code:#include <stdio.h> #include <tchar.h> int main() { wchar_t wc; FILE *fp; fp = fopen("test.txt", "w"); for (int i=0; i<5000; i++) { wc = i; fputwc(wc, fp); } fclose(fp); return 0; }