How would I make a file with Unicode characters in it? I don't know why this is so difficult to do, in any other language, you don't even have to specify that it's Unicode.

This is what I have

#include <iostream>
#include <fstream>
using namespace std;

int wmain()
{
	__wchar_t chara = '☺';
	wofstream f("poopa.txt");
	f << chara;
	f.close();
	return 0;
}

wmain, and wofstream (Meaning wide, or Unicode) don't work.

try to use fwprintf_s or fwprintf

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.