そのロケール設定が失敗します。
#include<cstdio>
#include<locale>
using namespace std;
int main()
{
wchar_t wstr[100]={L"EUC文書"};
FILE *file;
if(setlocale(LC_CTYPE,"japanese_japan.51932")==NULL){
printf("失敗");
return -1;
}
file=fopen("euc.txt","w");
if(file==NULL)return -1;
fputws(wstr,file);
fclose(file);
return 0;
}
環境はWinXP SP2,BCC5.5です。もしかしてWindowsではEUC_JPコードは使えないのでしょうか。よろしくお願いします。