>>488
CString BOM(_T("\ufeff"));
CString text(_T("hoge"));
CString out = BOM + text + _T("\r\n");
CFile cf(_T("test2.txt"), CFile::modeCreate | CFile::modeWrite);
cf.Write(out, out.GetLength()*2);
cf.Close();
可変長の文字列を扱うなら素直にiostreamかstdioを使ったほうがいいと思うがな。